업무일지 시간 요약화면에 휴일 데이터를 추가 함.
This commit is contained in:
@@ -39,6 +39,19 @@ namespace FPJ0000
|
||||
this.FormClosed += fPartList_FormClosed;
|
||||
this.FormClosing += FPartList_FormClosing;
|
||||
this.KeyDown += fPartList_KeyDown;
|
||||
this.dsPRJ.ProjectPartStatus.ColumnChanged += ProjectPartStatus_ColumnChanged;
|
||||
this.dsPRJ.ProjectPartStatus.RowChanged += ProjectPartStatus_RowChanged;
|
||||
}
|
||||
|
||||
private void ProjectPartStatus_RowChanged(object sender, DataRowChangeEventArgs e)
|
||||
{
|
||||
//if (e.Action == DataRowAction.Add || ) return;
|
||||
//Console.WriteLine("d");
|
||||
}
|
||||
|
||||
private void ProjectPartStatus_ColumnChanged(object sender, DataColumnChangeEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void FPartList_FormClosing(object sender, FormClosingEventArgs e)
|
||||
@@ -96,7 +109,8 @@ namespace FPJ0000
|
||||
string sortkey = string.Empty;
|
||||
void RefreshData()
|
||||
{
|
||||
if (dsPRJ.HasChanges())
|
||||
var changes = dsPRJ.ProjectPartStatus.GetChanges();
|
||||
if (changes != null && changes.Rows.Count > 0)
|
||||
{
|
||||
var dlg = FCOMMON.Util.MsgQ("변경 사항이 있습니다. 갱신하면 변경 내용이 손실 됩니다.\n지금 갱신 하겠습니까?");
|
||||
if (dlg != System.Windows.Forms.DialogResult.Yes) return;
|
||||
@@ -127,9 +141,10 @@ namespace FPJ0000
|
||||
// }
|
||||
//}
|
||||
//this.dsPRJ.AcceptChanges();
|
||||
RefreshSum();
|
||||
//RefreshSum();
|
||||
FPUtil.ColSizeLoad(ref this.fpSpread1, fn_fpcolsize);
|
||||
FormattingData();
|
||||
dsPRJ.ProjectPartStatus.AcceptChanges();
|
||||
}
|
||||
void FormattingData()
|
||||
{
|
||||
@@ -287,14 +302,12 @@ namespace FPJ0000
|
||||
this.fpSpread1.ResumeLayout();
|
||||
}
|
||||
|
||||
void RefreshSum()
|
||||
{
|
||||
decimal sum = this.dsPRJ.ProjectsPart.Where(t => t.RowState != DataRowState.Deleted && t.RowState != DataRowState.Detached).Sum(t => t.amt);
|
||||
decimal sumN = this.dsPRJ.ProjectsPart.Where(t => t.RowState != DataRowState.Deleted && t.RowState != DataRowState.Detached).Sum(t => t.amtn);
|
||||
|
||||
|
||||
//lbSum.Text = string.Format("1:{0:N0} / N:{1:N0}", sum, sumN);
|
||||
}
|
||||
//void RefreshSum()
|
||||
//{
|
||||
// decimal sum = this.dsPRJ.ProjectsPart.Where(t => t.RowState != DataRowState.Deleted && t.RowState != DataRowState.Detached).Sum(t => t.amt);
|
||||
// decimal sumN = this.dsPRJ.ProjectsPart.Where(t => t.RowState != DataRowState.Deleted && t.RowState != DataRowState.Detached).Sum(t => t.amtn);
|
||||
// //lbSum.Text = string.Format("1:{0:N0} / N:{1:N0}", sum, sumN);
|
||||
//}
|
||||
|
||||
|
||||
private void toolStripButton1_Click(object sender, EventArgs e)
|
||||
@@ -488,7 +501,7 @@ namespace FPJ0000
|
||||
var amt = iQty1 * iPrice1;
|
||||
fpSpread1.ActiveSheet.Cells[Rowidx, colidx_amt].Value = amt;
|
||||
//dv1.Rows[e.RowIndex].Cells["dvc_amt"].Value = amt;
|
||||
RefreshSum();
|
||||
//RefreshSum();
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -861,7 +874,7 @@ namespace FPJ0000
|
||||
if (dlg == DialogResult.Yes)
|
||||
{
|
||||
var taprj = new dsPRJTableAdapters.ProjectsTableAdapter();
|
||||
var cnt = taprj.UpdateCRDue(sd.ToShortDateString(), int.Parse(textBox5.Text), FCOMMON.info.Login.gcode);
|
||||
var cnt = taprj.UpdateCRDue(sd.ToShortDateString(), int.Parse(tbProjectIdx.Text), FCOMMON.info.Login.gcode);
|
||||
if (cnt != 1)
|
||||
{
|
||||
FCOMMON.Util.MsgE($"적용실패 {cnt}건의 자료가 업데이트 됨");
|
||||
@@ -875,6 +888,14 @@ namespace FPJ0000
|
||||
var drv = this.bsPart.Current as DataRowView;
|
||||
if (drv == null) return;
|
||||
var dr = drv.Row as dsPRJ.ProjectPartStatusRow;
|
||||
|
||||
//tbDue.Text = dr.crdue;
|
||||
//tbProjectIdx.Text = dr.Project.ToString();
|
||||
//tbProjectName.Text = dr.name;
|
||||
//tbOrderNo.Text = dr.orderno;
|
||||
//tbPDate.Text = dr.pdate;
|
||||
//tbStatus.Text = dr.status;
|
||||
|
||||
if (dr.crdue.isEmpty() == false)
|
||||
{
|
||||
DateTime dt;
|
||||
|
||||
Reference in New Issue
Block a user