업무일지 리포트 추가
This commit is contained in:
@@ -21,8 +21,8 @@ namespace FEQ0000
|
||||
|
||||
private void __Load(object sender, EventArgs e)
|
||||
{
|
||||
this.sd.Value = DateTime.Now.AddMonths(-1);
|
||||
this.ed.Value = DateTime.Now;
|
||||
//this.sd.Value = DateTime.Now.AddMonths(-1);
|
||||
this.dtPdate.Value = DateTime.Now;
|
||||
}
|
||||
|
||||
void __Closed(object sender, FormClosedEventArgs e)
|
||||
@@ -103,8 +103,8 @@ namespace FEQ0000
|
||||
//제목줄을 처리한다. 181029
|
||||
List<string> cols = new List<string>();
|
||||
|
||||
string sDate = sd.Value.ToShortDateString();
|
||||
string eDate = ed.Value.ToShortDateString();
|
||||
//string sDate = sd.Value.ToShortDateString();
|
||||
//string eDate = ed.Value.ToShortDateString();
|
||||
|
||||
for (int c = MinCol; c <= MaxCol; c++)
|
||||
{
|
||||
@@ -160,15 +160,16 @@ namespace FEQ0000
|
||||
{
|
||||
nullColumn = true; //날짜가 없다면 패스
|
||||
break;
|
||||
} else if(value.CompareTo(sDate) < 0)
|
||||
{
|
||||
nullColumn = true; //과거데이터라서 패스
|
||||
break;
|
||||
} else if(value.CompareTo(eDate) > 0)
|
||||
{
|
||||
nullColumn = true; //미래데이터 패스
|
||||
break;
|
||||
}
|
||||
}
|
||||
//else if(value.CompareTo(sDate) < 0)
|
||||
//{
|
||||
// nullColumn = true; //과거데이터라서 패스
|
||||
// break;
|
||||
//} else if(value.CompareTo(eDate) > 0)
|
||||
//{
|
||||
// nullColumn = true; //미래데이터 패스
|
||||
// break;
|
||||
//}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -220,6 +221,12 @@ namespace FEQ0000
|
||||
return;
|
||||
}
|
||||
|
||||
if(col_crcf.Value < 1 || col_sid.Value < 1 || col_name.Value < 1)
|
||||
{
|
||||
FCOMMON.Util.MsgE("CR번호/품명/SId는 반드시 입력되어야 합니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
System.Text.StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("다음 자료를 추가하시겠습니까?");
|
||||
sb.AppendLine();
|
||||
@@ -247,41 +254,60 @@ namespace FEQ0000
|
||||
|
||||
//데이터추가
|
||||
var newdr = dt.NewRow();
|
||||
if (dr[1] == DBNull.Value) continue; //nullerror
|
||||
if (dr[(int)col_crcf.Value] == DBNull.Value) continue; //nullerror
|
||||
|
||||
newdr["pdate"] = "2019-01-01";// dr[0].ToString();
|
||||
newdr["orderno"] = dr[1].ToString();
|
||||
newdr["sid"] = dr[2].ToString().Replace(" ",""); //181116 - 빈공백제거
|
||||
newdr["pdate"] = dtPdate.Value.ToString("yyyy-MM-dd");// "2019-01-01";// dr[0].ToString();
|
||||
newdr["orderno"] = dr[(int)col_crcf.Value].ToString();
|
||||
newdr["sid"] = dr[(int)col_sid.Value].ToString().Replace(" ", ""); //181116 - 빈공백제거
|
||||
|
||||
//이름 변경함
|
||||
if (dr[3].ToString() != "") dr[3] = dr[3].ToString().Replace("*", "x");
|
||||
if (dr[4].ToString() != "") dr[4] = dr[4].ToString().Replace("*", "x");
|
||||
|
||||
newdr["pumname"] = dr[3].ToString();
|
||||
newdr["pumscale"] = dr[4].ToString();
|
||||
if (dr[(int)col_name.Value].ToString() != "") dr[(int)col_name.Value] = dr[(int)col_name.Value].ToString().Replace("*", "x");
|
||||
//if (dr[4].ToString() != "") dr[4] = dr[4].ToString().Replace("*", "x");
|
||||
|
||||
newdr["pumunit"] = dr[7].ToString();
|
||||
newdr["pumname"] = dr[(int)col_name.Value].ToString();
|
||||
newdr["pumscale"] = "";// dr[4].ToString();
|
||||
|
||||
if (dr[6].ToString() != "")
|
||||
newdr["pumqty"] = int.Parse(dr[6].ToString());
|
||||
if ((int)numericUpDown7.Value > 0)
|
||||
newdr["pumunit"] = dr[(int)numericUpDown7.Value].ToString();
|
||||
|
||||
if (dr[5].ToString() != "")
|
||||
newdr["pumprice"] = decimal.Parse(dr[5].ToString());
|
||||
if ((int)col_qty.Value > 0)
|
||||
{
|
||||
if (dr[(int)col_qty.Value].ToString() != "")
|
||||
newdr["pumqty"] = int.Parse(dr[(int)col_qty.Value].ToString());
|
||||
}
|
||||
|
||||
if ((int)col_price.Value > 0)
|
||||
{
|
||||
if (dr[(int)col_price.Value].ToString() != "")
|
||||
newdr["pumprice"] = decimal.Parse(dr[(int)col_price.Value].ToString());
|
||||
}
|
||||
|
||||
if ((int)col_amt.Value > 0)
|
||||
{
|
||||
if (dr[(int)col_amt.Value].ToString() != "")
|
||||
newdr["pumamt"] = decimal.Parse(dr[(int)col_amt.Value].ToString());
|
||||
}
|
||||
|
||||
if (dr[8].ToString() != "")
|
||||
newdr["pumamt"] = decimal.Parse(dr[8].ToString());
|
||||
if ((int)col_supply.Value > 0)
|
||||
newdr["supply"] = dr[(int)col_supply.Value].ToString();
|
||||
|
||||
newdr["supply"] = dr[10].ToString();
|
||||
newdr["state"] = "PO";// dr[14 + 6].ToString();
|
||||
newdr["state"] = tbState.Text;// dr[14 + 6].ToString();
|
||||
newdr["import"] = true;
|
||||
newdr["wuid"] = "JBS";
|
||||
newdr["wdate"] = "2019-04-16 00:00:00";
|
||||
newdr["wuid"] = FCOMMON.info.Login.no;
|
||||
newdr["wdate"] = DateTime.Now;
|
||||
newdr["bigo"] = textBox2.Text.Trim();
|
||||
|
||||
dt.Rows.Add(newdr);
|
||||
}
|
||||
|
||||
var taE = new dsPurchaseTableAdapters.PurchaseTableAdapter();
|
||||
if(checkBox1.Checked) taE.DeleteImport(sd.Value.ToShortDateString(),ed.Value.ToShortDateString());
|
||||
|
||||
//과거데이터 삭제
|
||||
if (checkBox1.Checked) taE.DeleteImport(
|
||||
dtPdate.Value.ToShortDateString(),
|
||||
dtPdate.Value.ToShortDateString(),
|
||||
FCOMMON.info.Login.no);
|
||||
|
||||
taE.Update((dsPurchase.PurchaseDataTable)dt);
|
||||
|
||||
dt.AcceptChanges();
|
||||
|
||||
Reference in New Issue
Block a user