스케쥴 지연사유 입력 칸 추가

This commit is contained in:
chi
2021-07-01 11:47:28 +09:00
parent 19e09cdbfc
commit ac45a7429c
7 changed files with 2565 additions and 449 deletions

View File

@@ -17,7 +17,7 @@ namespace FPJ0000
EEEntities db;
List<EETGW_ProjectsSchedule> list;
Boolean bInit = false;
public fProjectSchedule(int project_)
{
InitializeComponent();
@@ -28,8 +28,11 @@ namespace FPJ0000
this.FormClosed += FProjectSchedule_FormClosed;
this.FormClosing += FProjectSchedule_FormClosing;
this.dsPRJ.EETGW_ProjectsSchedule.TableNewRow += ProjectsSchedule_TableNewRow;
//this.dsPRJ.EETGW_ProjectReson.TableNewRow += EETGW_ProjectReson_TableNewRow;
}
private void FProjectSchedule_FormClosing(object sender, FormClosingEventArgs e)
{
this.Validate();
@@ -52,6 +55,13 @@ namespace FPJ0000
this.dsPRJ.EETGW_ProjectsSchedule.TableNewRow -= ProjectsSchedule_TableNewRow;
this.dsPRJ.EETGW_ProjectsSchedule.RowChanged += EETGW_ProjectsSchedule_RowChanged;
}
private void EETGW_ProjectReson_TableNewRow(object sender, DataTableNewRowEventArgs e)
{
e.Row["wuid"] = FCOMMON.info.Login.no;
e.Row["wdate"] = DateTime.Now;
e.Row["project"] = this.projectindex;
e.Row["gcode"] = FCOMMON.info.Login.gcode;
}
void ProjectsSchedule_TableNewRow(object sender, DataTableNewRowEventArgs e)
{
@@ -95,7 +105,7 @@ namespace FPJ0000
RefreshData();
RefreshGraph();
this.dsPRJ.EETGW_ProjectsSchedule.RowChanged += EETGW_ProjectsSchedule_RowChanged;
//시작할떄 cww 를 가져오낟.
var sql = "select dbo.getWorkWeek('" + DateTime.Now.ToShortDateString() + "')";
@@ -129,6 +139,7 @@ namespace FPJ0000
this.ta.Fill(this.dsPRJ.EETGW_ProjectsSchedule, FCOMMON.info.Login.gcode, this.projectindex, scno);
this.taTodo.Fill(this.dsPRJ.EETGW_ProjectToDo, this.projectindex);
this.taReason.Fill(this.dsPRJ.EETGW_ProjectReson, FCOMMON.info.Login.gcode, this.projectindex, int.Parse(comboBox1.Text));
//this.bs.DataSource = list;//.ToList();// db.EETGW_ProjectsSchedule.Local;
//this.fpSpread1_Sheet1.DataSource = this.bs;
FPUtil.ColSizeLoad(ref this.fpSpread1, fn_fpcolsize1);
@@ -148,7 +159,7 @@ namespace FPJ0000
chkapp1.Checked = false;
chkapp2.Checked = false;
}
else if (dr.appoval == 1)
{
@@ -172,8 +183,8 @@ namespace FPJ0000
this.fpSpread1.Sheets[0].Columns[3].BackColor = Color.FromArgb(230, 230, 230);
}
@@ -271,7 +282,9 @@ namespace FPJ0000
{
this.fpSpread2.Enabled = true;
bnTodo.Enabled = true;
this.bsTodo.Filter = "pseq=" + dr.idx; //해당데이터만 처리하게 한다
this.bsReason.Filter = "pseq=" + dr.idx;
}
}
@@ -288,6 +301,8 @@ namespace FPJ0000
newdr.wdate = DateTime.Now;
newdr.pidx = this.projectindex;
newdr.pseq = dr.idx;
newdr.gcode = FCOMMON.info.Login.gcode;
newdr.no = int.Parse(comboBox1.Text);
this.dsPRJ.EETGW_ProjectToDo.AddEETGW_ProjectToDoRow(newdr);
bsTodo.EndEdit();
@@ -321,6 +336,8 @@ namespace FPJ0000
this.Validate();
this.bs.EndEdit();
this.bsTodo.EndEdit();
this.bsReason.EndEdit();
if (this.dsPRJ.HasChanges() == false)
{
FCOMMON.Util.MsgE("변경된 내용이 없습니다");
@@ -330,7 +347,8 @@ namespace FPJ0000
{
var cnt1 = this.ta.Update(this.dsPRJ.EETGW_ProjectsSchedule);
var cnt2 = this.taTodo.Update(this.dsPRJ.EETGW_ProjectToDo);
var cnt = cnt1 + cnt2;// this.tam.UpdateAll(this.dsPRJ);
var cnt3 = this.taReason.Update(this.dsPRJ.EETGW_ProjectReson);
var cnt = cnt1 + cnt2 + cnt3;// this.tam.UpdateAll(this.dsPRJ);
if (cnt == 0)
{
FCOMMON.Util.MsgE("저장된 자료가 없습니다");
@@ -595,14 +613,14 @@ namespace FPJ0000
util.MsgE("'승인권한1'이 없습니다");
return;
}
if(chkapp1.Checked)
if (chkapp1.Checked)
{
util.MsgE("'승인해제1'는 현재 구현 중");
}
else
{
chkapp1.Checked = true;
foreach(var item in this.dsPRJ.EETGW_ProjectsSchedule)
foreach (var item in this.dsPRJ.EETGW_ProjectsSchedule)
{
if (item.RowState == DataRowState.Deleted || item.RowState == DataRowState.Deleted) continue;
item.appoval = 1;
@@ -638,11 +656,48 @@ namespace FPJ0000
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (bInit == false) return;
if(comboBox1.SelectedIndex == this.comboBox1.Items.Count-1)
if (comboBox1.SelectedIndex == this.comboBox1.Items.Count - 1)
{
util.MsgE("스케쥴 신규 추가 기능은 준비 중 입니다");
this.comboBox1.SelectedIndex = this.comboBox1.Items.Count - 2;
}
}
private void toolStripButton15_Click(object sender, EventArgs e)
{
var drv = this.bs.Current as DataRowView;
if (drv == null) return;
var dr = drv.Row as dsPRJ.EETGW_ProjectsScheduleRow;
//사유추가
var newdr = this.dsPRJ.EETGW_ProjectReson.NewEETGW_ProjectResonRow();
newdr.wuid = FCOMMON.info.Login.no;
newdr.wdate = DateTime.Now;
newdr.pidx = this.projectindex;
newdr.pdate = DateTime.Now.ToShortDateString();
newdr.pseq = dr.idx;
newdr.gcode = FCOMMON.info.Login.gcode;
newdr.no = int.Parse(comboBox1.Text);
this.dsPRJ.EETGW_ProjectReson.AddEETGW_ProjectResonRow(newdr);
bsReason.EndEdit();
this.dataGridView1.Focus();
if (this.bsReason.Count > 0)
this.bsReason.Position = this.bsReason.Count - 1;
}
private void toolStripButton17_Click(object sender, EventArgs e)
{
this.Validate();
this.bsReason.EndEdit();
var cnt = taReason.Update(this.dsPRJ.EETGW_ProjectReson);
FCOMMON.Util.MsgI($"{cnt}건의 자료가 업데이트 되었습니다");
}
private void toolStripButton16_Click(object sender, EventArgs e)
{
bsReason.RemoveCurrent();
}
}
}