w전자실 업무일지 양식 수정, 저장 후 색상 업데이트
This commit is contained in:
@@ -150,6 +150,7 @@
|
|||||||
<Compile Include="fWebCamera.Designer.cs">
|
<Compile Include="fWebCamera.Designer.cs">
|
||||||
<DependentUpon>fWebCamera.cs</DependentUpon>
|
<DependentUpon>fWebCamera.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="ISO8601.cs" />
|
||||||
<Compile Include="keyValuedataTable.cs" />
|
<Compile Include="keyValuedataTable.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Info.cs" />
|
<Compile Include="Info.cs" />
|
||||||
|
|||||||
37
SubProject/FCOMMON/ISO8601.cs
Normal file
37
SubProject/FCOMMON/ISO8601.cs
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
|
||||||
|
namespace ISO8601
|
||||||
|
{
|
||||||
|
public static class Calender
|
||||||
|
{
|
||||||
|
private static CultureInfo culture = CultureInfo.CurrentCulture;
|
||||||
|
|
||||||
|
private static int CalcDate(DateTime date)
|
||||||
|
{
|
||||||
|
return date.DayOfWeek != DayOfWeek.Sunday ? DayOfWeek.Thursday - date.DayOfWeek : (int)DayOfWeek.Tuesday - 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int GetYear(DateTime date)
|
||||||
|
{
|
||||||
|
date = date.AddDays(CalcDate(date));
|
||||||
|
return culture.Calendar.GetYear(date);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int GetMonth(DateTime date)
|
||||||
|
{
|
||||||
|
date = date.AddDays(CalcDate(date));
|
||||||
|
return culture.Calendar.GetMonth(date);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int GetWorkWeek(DateTime date)
|
||||||
|
{
|
||||||
|
date = date.AddDays(CalcDate(date));
|
||||||
|
return culture.Calendar.GetWeekOfYear(date, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -203,6 +203,7 @@ namespace FPJ0000
|
|||||||
{
|
{
|
||||||
FCOMMON.Util.MsgE(ex.Message);
|
FCOMMON.Util.MsgE(ex.Message);
|
||||||
}
|
}
|
||||||
|
FormattingData();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void projectsBindingNavigatorSaveItem_Click(object sender, EventArgs e)
|
private void projectsBindingNavigatorSaveItem_Click(object sender, EventArgs e)
|
||||||
@@ -388,6 +389,17 @@ namespace FPJ0000
|
|||||||
var fn = System.IO.Path.Combine(FCOMMON.Util.CurrentPath, "EBoardDailyform.xlsx");
|
var fn = System.IO.Path.Combine(FCOMMON.Util.CurrentPath, "EBoardDailyform.xlsx");
|
||||||
System.IO.File.Copy(fn, sd.FileName, true);
|
System.IO.File.Copy(fn, sd.FileName, true);
|
||||||
book.load(sd.FileName);
|
book.load(sd.FileName);
|
||||||
|
|
||||||
|
//week 기록
|
||||||
|
var lastrow = dsMSSQL.EETGW_JobReport_EBoard.FirstOrDefault();
|
||||||
|
if(lastrow != null)
|
||||||
|
{
|
||||||
|
var ww = ISO8601.Calender.GetWorkWeek(DateTime.Parse( lastrow.pdate));
|
||||||
|
var sht1 = book.getSheet(2);
|
||||||
|
sht1.writeNum(1, 0, ww);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var sht = book.getSheet(0);
|
var sht = book.getSheet(0);
|
||||||
//2번쨰 줄부터 데이터를 기록한다.
|
//2번쨰 줄부터 데이터를 기록한다.
|
||||||
var row = 1;
|
var row = 1;
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user