1. 업무일지 작업형태 선택 ui 변경

2. 작업형태 목록 편집 UI 추가
3. 스케쥴 관련메일 발송주기를 15분에서 30분으로 변경하고 18시 이후에는 발송하지 않게 한다(최근 오류메세지가 수신된다)
This commit is contained in:
chi
2025-01-03 09:09:25 +09:00
parent c810348fa6
commit 4593c6fd74
25 changed files with 1644 additions and 664 deletions

View File

@@ -1,4 +1,5 @@
using System;
using FCOMMON;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -155,13 +156,18 @@ namespace FPJ0000
btSave.Visible = false;
//btViewDel.Visible = false;
fpSpread1.EditMode = false;
fpSpread1.Sheets[0].SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Row;
//fpSpread1.Sheets[0].SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Row;
fpSpread1.EditModePermanent = false;
fpSpread1.EditModeReplace = false;
foreach (FarPoint.Win.Spread.Column col in fpSpread1.ActiveSheet.Columns)
col.Locked = true;
}
//fpSpread1.SelectionBlockOptions = FarPoint.Win.Spread.SelectionBlockOptions.Cells;
fpSpread1.ActiveSheet.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Cell;
fpSpread1.ActiveSheet.SelectionPolicy = FarPoint.Win.Spread.Model.SelectionPolicy.MultiRange;
fpSpread1.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.Normal;
@@ -346,30 +352,32 @@ namespace FPJ0000
this.fpSpread1.ActiveSheet.Rows[i].BackColor = SystemColors.Window;
break;
}
if(statusStr.EndsWith("완료"))
if (statusStr.EndsWith("완료"))
{
this.fpSpread1.ActiveSheet.Cells[i,stsindex].BackColor = Color.Lime;
this.fpSpread1.ActiveSheet.Cells[i, stsindex].BackColor = Color.Lime;
}
else
{
this.fpSpread1.ActiveSheet.Cells[i, stsindex].BackColor = Color.Tomato;
this.fpSpread1.ActiveSheet.Cells[i, stsindex].BackColor = Color.Gold;
}
}
this.fpSpread1.ResumeLayout();
}
void funcSave()
int funcSave()
{
int cnt = 0;
this.Validate();
this.bs.EndEdit();
try
{
this.tam.UpdateAll(this.dsMSSQL);
cnt = this.tam.UpdateAll(this.dsMSSQL);
FormattingData();
}
catch (Exception ex)
{
FCOMMON.Util.MsgE("저장 실패\n" + ex.Message);
}
return cnt;
}
private void projectsBindingNavigatorSaveItem_Click(object sender, EventArgs e)
@@ -586,9 +594,10 @@ namespace FPJ0000
//newdr.description = "";
newdr.pdate = DateTime.Now.ToShortDateString(); //190509
newdr.idx = -1;
newdr.hrs = 8.0;
//newdr.hrs = 8.0;
newdr.SethrsNull();
newdr.ot = 0.0;
newdr.status = string.Empty;
newdr.Setot2Null();
newdr.SetotwuidNull();
newdr.SetotReasonNull();
@@ -895,12 +904,12 @@ namespace FPJ0000
newdr.wdate = DateTime.Now;
newdr.wuid = FCOMMON.info.Login.no;
newdr.uid = FCOMMON.info.Login.no;
newdr.pdate = d.ToShortDateString(); //190509
newdr.idx = -1;
newdr.hrs = 8.0;
newdr.ot = 0.0;
newdr.Setot2Null();
newdr.SetotwuidNull();
newdr.SetotReasonNull();
@@ -914,10 +923,65 @@ namespace FPJ0000
ucnt += ta.Update(dsMSSQL.JobReport);
d = d.AddDays(1);
}
util.MsgI($"토/일은 제외되었습니다. 기타 휴일은 적용되지 않았으니 데이터를 확인하세요\nupdate count : {ucnt}");
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
//상태일괄변경
var selected = this.fpSpread1_Sheet1.GetSelections(); //선택된 개체확인
List<int> rows = new List<int>();
foreach (var item in selected)
{
for (int i = item.Row; i < item.Row + item.RowCount; i++)
{
if (rows.Contains(i) == false)
{
if (fpSpread1_Sheet1.IsRowBound(i))
{
rows.Add(i);
}
}
}
}
//이대상의 실제 데이터베이스 인덱스값을 생성해서 폼에 전송한다.
var codlist = DBM.getCodeList("12");
var f = new FCOMMON.fLOV(codlist.Select(t => t.Value).ToArray());
if (f.ShowDialog() != DialogResult.OK) return;
if (f.SelectedValue.isEmpty()) return;
var colstat = fpSpread1_Sheet1.Columns["status"];
var colidx = fpSpread1_Sheet1.Columns["idx"];
var value = f.SelectedValue;
foreach (var rowindex in rows)
{
var idx = fpSpread1_Sheet1.Cells[rowindex, colidx.Index].Value;
var dr = this.dsMSSQL.JobReport.Where(t => t.idx == (int)idx).FirstOrDefault();
dr["status"] = value;
dr.EndEdit();
}
this.Validate();
this.bs.EndEdit();
if (btSave.Visible == false)
{
var cnt = funcSave();
AR.UTIL.MsgI($"{cnt}건의 자료가 업데이트 되었습니다");
}
else
{
FCOMMON.Util.MsgI($"{rows.Count} 건의 자료가 변경되었습니다\n저장 버튼을 누르면 적용 됩니다\n취소하려면 새로고침을 누르세요");
}
}
}
}