migratino complete
This commit is contained in:
@@ -41,117 +41,117 @@ namespace FPJ0000
|
||||
|
||||
private void fProjectData_Load(object sender, EventArgs e)
|
||||
{
|
||||
EnsureVisibleAndUsableSize();
|
||||
var db = new EEEntities();
|
||||
//EnsureVisibleAndUsableSize();
|
||||
//var db = new EEEntities();
|
||||
|
||||
//자동완성목록 업데이트
|
||||
Task.Run(new Action(() =>
|
||||
{
|
||||
////자동완성목록 업데이트
|
||||
//Task.Run(new Action(() =>
|
||||
//{
|
||||
|
||||
//UID목록
|
||||
var lst_uid = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.uid) == false).OrderBy(t => t.uid).GroupBy(t => t.uid).Select(t => t.FirstOrDefault());
|
||||
SetComboboxItems(cmbUID, lst_uid.Select(t => t.uid).ToArray());
|
||||
// //UID목록
|
||||
// var lst_uid = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.uid) == false).OrderBy(t => t.uid).GroupBy(t => t.uid).Select(t => t.FirstOrDefault());
|
||||
// SetComboboxItems(cmbUID, lst_uid.Select(t => t.uid).ToArray());
|
||||
|
||||
//요청자
|
||||
var lst_req = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.요청자) == false).OrderBy(t => t.요청자).GroupBy(t => t.요청자).Select(t => t.FirstOrDefault());
|
||||
SetComboboxItems(cmb요청자, lst_req.Select(t => t.요청자).ToArray());
|
||||
// //요청자
|
||||
// var lst_req = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.요청자) == false).OrderBy(t => t.요청자).GroupBy(t => t.요청자).Select(t => t.FirstOrDefault());
|
||||
// SetComboboxItems(cmb요청자, lst_req.Select(t => t.요청자).ToArray());
|
||||
|
||||
//모델
|
||||
var lst_mod = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.Model) == false).OrderBy(t => t.Model).GroupBy(t => t.Model).Select(t => t.FirstOrDefault());
|
||||
SetComboboxItems(cmbModel, lst_mod.Select(t => t.Model).ToArray());
|
||||
cmbModel.Enabled = true;
|
||||
// //모델
|
||||
// var lst_mod = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.Model) == false).OrderBy(t => t.Model).GroupBy(t => t.Model).Select(t => t.FirstOrDefault());
|
||||
// SetComboboxItems(cmbModel, lst_mod.Select(t => t.Model).ToArray());
|
||||
// cmbModel.Enabled = true;
|
||||
|
||||
//BoardName
|
||||
var lst_bon = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.BoardName) == false).OrderBy(t => t.BoardName).GroupBy(t => t.BoardName).Select(t => t.FirstOrDefault());
|
||||
SetComboboxItems(cmbBoardName, lst_bon.Select(t => t.BoardName).ToArray());
|
||||
cmbBoardName.Enabled = true;
|
||||
// //BoardName
|
||||
// var lst_bon = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.BoardName) == false).OrderBy(t => t.BoardName).GroupBy(t => t.BoardName).Select(t => t.FirstOrDefault());
|
||||
// SetComboboxItems(cmbBoardName, lst_bon.Select(t => t.BoardName).ToArray());
|
||||
// cmbBoardName.Enabled = true;
|
||||
|
||||
//BoardVender
|
||||
var lst_bvn = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.BoardVender) == false).OrderBy(t => t.BoardVender).GroupBy(t => t.BoardVender).Select(t => t.FirstOrDefault());
|
||||
SetComboboxItems(cmbBoardVender, lst_bvn.Select(t => t.BoardVender).ToArray());
|
||||
// //BoardVender
|
||||
// var lst_bvn = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.BoardVender) == false).OrderBy(t => t.BoardVender).GroupBy(t => t.BoardVender).Select(t => t.FirstOrDefault());
|
||||
// SetComboboxItems(cmbBoardVender, lst_bvn.Select(t => t.BoardVender).ToArray());
|
||||
|
||||
//SN
|
||||
var lst_srn = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.SN) == false).OrderBy(t => t.SN).GroupBy(t => t.SN).Select(t => t.FirstOrDefault());
|
||||
SetComboboxItems(cmbSN, lst_srn.Select(t => t.SN).ToArray());
|
||||
// //SN
|
||||
// var lst_srn = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.SN) == false).OrderBy(t => t.SN).GroupBy(t => t.SN).Select(t => t.FirstOrDefault());
|
||||
// SetComboboxItems(cmbSN, lst_srn.Select(t => t.SN).ToArray());
|
||||
|
||||
////status
|
||||
//var lst_sta = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.Status) == false).OrderBy(t => t.Status).GroupBy(t => t.Status).Select(t => t.FirstOrDefault());
|
||||
//SetComboboxItems(cmbStatus,lst_sta.Select(t => t.Status).ToArray());
|
||||
// ////status
|
||||
// //var lst_sta = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.Status) == false).OrderBy(t => t.Status).GroupBy(t => t.Status).Select(t => t.FirstOrDefault());
|
||||
// //SetComboboxItems(cmbStatus,lst_sta.Select(t => t.Status).ToArray());
|
||||
|
||||
//분류
|
||||
var lst_cat = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.분류) == false).OrderBy(t => t.분류).GroupBy(t => t.분류).Select(t => t.FirstOrDefault());
|
||||
SetComboboxItems(cmb분류, lst_cat.Select(t => t.분류).ToArray());
|
||||
// //분류
|
||||
// var lst_cat = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.분류) == false).OrderBy(t => t.분류).GroupBy(t => t.분류).Select(t => t.FirstOrDefault());
|
||||
// SetComboboxItems(cmb분류, lst_cat.Select(t => t.분류).ToArray());
|
||||
|
||||
//Site
|
||||
var lst_sit = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.Site) == false).OrderBy(t => t.Site).GroupBy(t => t.Site).Select(t => t.FirstOrDefault());
|
||||
SetComboboxItems(cmbSite, lst_sit.Select(t => t.Site).ToArray());
|
||||
// //Site
|
||||
// var lst_sit = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.Site) == false).OrderBy(t => t.Site).GroupBy(t => t.Site).Select(t => t.FirstOrDefault());
|
||||
// SetComboboxItems(cmbSite, lst_sit.Select(t => t.Site).ToArray());
|
||||
|
||||
//Line
|
||||
var lst_lin = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.Line) == false).OrderBy(t => t.Line).GroupBy(t => t.Line).Select(t => t.FirstOrDefault());
|
||||
SetComboboxItems(cmbLine, lst_lin.Select(t => t.Line).ToArray());
|
||||
// //Line
|
||||
// var lst_lin = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.Line) == false).OrderBy(t => t.Line).GroupBy(t => t.Line).Select(t => t.FirstOrDefault());
|
||||
// SetComboboxItems(cmbLine, lst_lin.Select(t => t.Line).ToArray());
|
||||
|
||||
//division
|
||||
var lst_div = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.Division) == false).OrderBy(t => t.Division).GroupBy(t => t.Division).Select(t => t.FirstOrDefault());
|
||||
SetComboboxItems(cmbDivision, lst_div.Select(t => t.Division).ToArray());
|
||||
// //division
|
||||
// var lst_div = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.Division) == false).OrderBy(t => t.Division).GroupBy(t => t.Division).Select(t => t.FirstOrDefault());
|
||||
// SetComboboxItems(cmbDivision, lst_div.Select(t => t.Division).ToArray());
|
||||
|
||||
////Team
|
||||
//var lst_tem = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.Team) == false).OrderBy(t => t.Team).GroupBy(t => t.Team).Select(t => t.FirstOrDefault());
|
||||
//SetComboboxItems(cmbTeam,lst_tem.Select(t => t.Team).ToArray());
|
||||
// ////Team
|
||||
// //var lst_tem = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.Team) == false).OrderBy(t => t.Team).GroupBy(t => t.Team).Select(t => t.FirstOrDefault());
|
||||
// //SetComboboxItems(cmbTeam,lst_tem.Select(t => t.Team).ToArray());
|
||||
|
||||
//Process
|
||||
var lst_prc = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.Process) == false).OrderBy(t => t.Process).GroupBy(t => t.Process).Select(t => t.FirstOrDefault());
|
||||
SetComboboxItems(cmbProcess, lst_prc.Select(t => t.Process).ToArray());
|
||||
cmbProcess.Enabled = true;
|
||||
// //Process
|
||||
// var lst_prc = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.Process) == false).OrderBy(t => t.Process).GroupBy(t => t.Process).Select(t => t.FirstOrDefault());
|
||||
// SetComboboxItems(cmbProcess, lst_prc.Select(t => t.Process).ToArray());
|
||||
// cmbProcess.Enabled = true;
|
||||
|
||||
//외주업체
|
||||
var lst_ext = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.외주업체) == false).OrderBy(t => t.외주업체).GroupBy(t => t.외주업체).Select(t => t.FirstOrDefault());
|
||||
SetComboboxItems(cmb외주업체, lst_ext.Select(t => t.외주업체).ToArray());
|
||||
}));
|
||||
// //외주업체
|
||||
// var lst_ext = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.외주업체) == false).OrderBy(t => t.외주업체).GroupBy(t => t.외주업체).Select(t => t.FirstOrDefault());
|
||||
// SetComboboxItems(cmb외주업체, lst_ext.Select(t => t.외주업체).ToArray());
|
||||
//}));
|
||||
|
||||
|
||||
///원인
|
||||
if (string.IsNullOrEmpty(dr.원인2))
|
||||
{
|
||||
this.richTextBoxEx1.Text = dr.원인;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
this.richTextBoxEx1.Rtf = dr.원인2;
|
||||
}
|
||||
catch
|
||||
{
|
||||
this.richTextBoxEx1.Text = dr.원인;
|
||||
}
|
||||
}
|
||||
/////원인
|
||||
//if (string.IsNullOrEmpty(dr.원인2))
|
||||
//{
|
||||
// this.richTextBoxEx1.Text = dr.원인;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// this.richTextBoxEx1.Rtf = dr.원인2;
|
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// this.richTextBoxEx1.Text = dr.원인;
|
||||
// }
|
||||
//}
|
||||
|
||||
///결과
|
||||
if (string.IsNullOrEmpty(dr.결과2))
|
||||
{
|
||||
this.richTextBoxEx2.Text = dr.결과;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
this.richTextBoxEx2.Rtf = dr.결과2;
|
||||
}
|
||||
catch
|
||||
{
|
||||
this.richTextBoxEx2.Text = dr.결과;
|
||||
}
|
||||
}
|
||||
/////결과
|
||||
//if (string.IsNullOrEmpty(dr.결과2))
|
||||
//{
|
||||
// this.richTextBoxEx2.Text = dr.결과;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// this.richTextBoxEx2.Rtf = dr.결과2;
|
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// this.richTextBoxEx2.Text = dr.결과;
|
||||
// }
|
||||
//}
|
||||
|
||||
this.checkBox1.Checked = dr.refdata;
|
||||
this.tbSdate.Text = dr.pdate;
|
||||
this.tbEdate.Text = dr.수리완료일;
|
||||
this.tbQty.Text = dr.QTY.ToString();
|
||||
this.tbCostNew.Text = dr.NPrice.ToString();
|
||||
this.tbCostOutSource.Text = dr.OPrice.ToString();
|
||||
this.tbCostRepair.Text = dr.RepairCost.ToString();
|
||||
this.tbCostReduct.Text = dr.CostReduction.ToString();
|
||||
this.bs.DataSource = dr;
|
||||
//this.checkBox1.Checked = dr.refdata;
|
||||
//this.tbSdate.Text = dr.pdate;
|
||||
//this.tbEdate.Text = dr.수리완료일;
|
||||
//this.tbQty.Text = dr.QTY.ToString();
|
||||
//this.tbCostNew.Text = dr.NPrice.ToString();
|
||||
//this.tbCostOutSource.Text = dr.OPrice.ToString();
|
||||
//this.tbCostRepair.Text = dr.RepairCost.ToString();
|
||||
//this.tbCostReduct.Text = dr.CostReduction.ToString();
|
||||
//this.bs.DataSource = dr;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user