사용자 목록화면 수정 및 업무일지와 적정인원 체크 박스 추가

This commit is contained in:
chi
2021-01-21 10:22:27 +09:00
parent 445bbe3514
commit d3778387de
57 changed files with 18406 additions and 1632 deletions

View File

@@ -0,0 +1,175 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Windows.Forms;
namespace FPJ0000
{
public partial class fEboardData : FCOMMON.fBase
{
dsPRJ.ProjectsRow dr = null;
public fEboardData(dsPRJ.ProjectsRow pidx_)
{
InitializeComponent();
this.UseFormSetting = false;
this.dr = pidx_;
this.dsPRJ.ProjectsHistory.TableNewRow += ProjectsHistory_TableNewRow;
}
void ProjectsHistory_TableNewRow(object sender, DataTableNewRowEventArgs e)
{
e.Row["wuid"] = FCOMMON.info.Login.no;
e.Row["wdate"] = DateTime.Now;
e.Row["pidx"] = this.dr.idx;
e.Row["div"] = "";
e.Row["remark"] = string.Empty;
e.Row["pdate"] = DateTime.Now.ToShortDateString();
}
private void fProjectData_Load(object sender, EventArgs e)
{
//상태
var dt_eetproc = FCOMMON.DBM.getCodeTable("10");
this.cmbProcess.DisplayMember = "Value";
this.cmbProcess.ValueMember = "Value";
this.cmbProcess.DataSource = dt_eetproc;
//분류 - 190903
var dt_cate = FCOMMON.DBM.getCodeTable("20", "code");
this.cmbCate.DisplayMember = "Value";
this.cmbCate.ValueMember = "Value";
this.cmbCate.DataSource = dt_cate;
//공정
var dt_status = FCOMMON.DBM.getCodeTable("01");
this.cmbState.DisplayMember = "Value";
this.cmbState.ValueMember = "Value";
this.cmbState.DataSource = dt_status;
//파트
var dt_part = FCOMMON.DBM.getCodeTable("11");
this.cmbPart.DisplayMember = "Value";
this.cmbPart.ValueMember = "Value";
this.cmbPart.DataSource = dt_part;
this.bs.DataSource = dr;
//주간일지내역을 업데이트
refresh_History();
//일업무현황 업데이트
this.taHistD.Fill(this.dsPRJ.EETGW_ProjecthistoryD, this.dr.idx);
//todo 업데이트
refreshTodo();
try
{
if (dr.idx >= 0)
this.taSchedule.Fill(this.dsPRJ.ProjectsSchedule, this.dr.idx);
}
catch (System.Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
this.cmbProcess.Text = dr.process;
this.cmbState.Text = dr.status;
this.cmbPart.Text = dr.part;
this.cmbCate.Text = dr.category;
}
private void btSave_Click(object sender, EventArgs e)
{
this.dr.process = cmbProcess.Text;
this.dr.status = cmbState.Text;
this.dr.part = cmbPart.Text;
this.dr.category = cmbCate.Text;
this.Validate();
this.bs.EndEdit();
this.bsHistWeek.EndEdit();
this.bsHistDay.EndEdit();
this.bsTodo.EndEdit();
this.taToDo.Update(this.dsPRJ.EETGW_ProjectToDo);
this.taHist.Update(this.dsPRJ.ProjectsHistory);
this.taHistD.Update(this.dsPRJ.EETGW_ProjecthistoryD);
this.DialogResult = System.Windows.Forms.DialogResult.OK;
//this.tableAdapterManager.UpdateAll(this.dsPRJ);
}
void refresh_History()
{
try
{
if (dr.idx >= 0)
this.taHist.Fill(this.dsPRJ.ProjectsHistory, this.dr.idx);
}
catch (System.Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
}
void SelectDate(TextBox ctl)
{
DateTime dt;
var dateStr = ctl.Text.Trim();
if (dateStr == "") dateStr = DateTime.Now.ToShortDateString();
else
{
if (DateTime.TryParse(dateStr, out dt)) dateStr = dt.ToShortDateString();
else
{
FCOMMON.Util.MsgE("날짜 형식으로 변환할 수 없는 문자열 입니다.\n" +
"기준일자가 금일로 변경 됩니다");
dateStr = DateTime.Now.ToShortDateString();
}
}
dt = DateTime.Parse(dateStr);
var f = new FCOMMON.fSelectDay(dt);
if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
ctl.Text = f.dtPick.SelectionStart.ToShortDateString();
}
}
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
SelectDate(sdateTextBox);
}
private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
SelectDate(edateTextBox);
}
private void bs_CurrentChanged(object sender, EventArgs e)
{
}
void refreshTodo()
{
taToDo.Fill(this.dsPRJ.EETGW_ProjectToDo, this.dr.idx);
}
}
}