비용요약 추가
This commit is contained in:
@@ -101,29 +101,49 @@ namespace FPJ0000
|
||||
MaxRow = (int)Math.Min(MaxRow, nudE.Value - 1);
|
||||
MinRow = (int)Math.Max(MinRow, nudS.Value - 1);
|
||||
|
||||
|
||||
string no = "";
|
||||
string SID = "";
|
||||
string 품명 = "";
|
||||
string 규격 = "";
|
||||
string 단가 = "";
|
||||
string 수량 = "";
|
||||
string 단위 = "";
|
||||
string 제조사 = "";
|
||||
string 공급사 = "";
|
||||
string 그룹 = "";
|
||||
string 비고 = "";
|
||||
string 적용부위 = "";
|
||||
string 납기일 = "";
|
||||
string 중분류 = "";
|
||||
|
||||
|
||||
|
||||
this.progressBar1.Value = 0;
|
||||
this.progressBar1.Maximum = MaxRow - MinRow + 1;
|
||||
this.dataGridView1.Visible = false;
|
||||
decimal sumamt = 0;
|
||||
try
|
||||
{
|
||||
{
|
||||
for (int r = MinRow; r <= MaxRow; r++)
|
||||
{
|
||||
progressBar1.Value += 1;
|
||||
|
||||
//필수값을 먼저 확인한다.
|
||||
var no = sheet.readStr(r, (int)nudNo.Value - 1);
|
||||
var SID = sheet.readStr(r, (int)nudSid.Value - 1);
|
||||
var 품명 = sheet.readStr(r, (int)this.nudName.Value - 1);
|
||||
var 규격 = sheet.readStr(r, (int)this.nudModel.Value - 1);
|
||||
var 단가 = sheet.readStr(r, (int)this.nudPrice.Value - 1).Replace(",", "");
|
||||
var 수량 = sheet.readStr(r, (int)nudQty.Value - 1).Replace(",", "");
|
||||
var 단위 = sheet.readStr(r, (int)nudUnit.Value - 1);
|
||||
var 제조사 = sheet.readStr(r, (int)nudManu.Value - 1);
|
||||
var 공급사 = sheet.readStr(r, (int)nudSupply.Value - 1);
|
||||
var 그룹 = sheet.readStr(r, (int)nudGrp.Value - 1);
|
||||
var 비고 = sheet.readStr(r, (int)nudMemo.Value - 1);
|
||||
var 적용부위 = sheet.readStr(r, (int)nudBuwi.Value - 1);
|
||||
var 납기일 = sheet.readStr(r, (int)nudNapKi.Value - 1);
|
||||
if (nudNo.Value > 0) no = sheet.readStr(r, (int)nudNo.Value - 1);
|
||||
if (nudSid.Value > 0) SID = sheet.readStr(r, (int)nudSid.Value - 1);
|
||||
if (nudName.Value > 0) 품명 = sheet.readStr(r, (int)this.nudName.Value - 1);
|
||||
if (nudModel.Value > 0) 규격 = sheet.readStr(r, (int)this.nudModel.Value - 1);
|
||||
if (nudPrice.Value > 0) 단가 = sheet.readStr(r, (int)this.nudPrice.Value - 1).Replace(",", "");
|
||||
if (nudQty.Value > 0) 수량 = sheet.readStr(r, (int)nudQty.Value - 1).Replace(",", "");
|
||||
if (nudUnit.Value > 0) 단위 = sheet.readStr(r, (int)nudUnit.Value - 1);
|
||||
if (nudManu.Value > 0) 제조사 = sheet.readStr(r, (int)nudManu.Value - 1);
|
||||
if (nudSupply.Value > 0) 공급사 = sheet.readStr(r, (int)nudSupply.Value - 1);
|
||||
if (nudGrp.Value > 0) 그룹 = sheet.readStr(r, (int)nudGrp.Value - 1);
|
||||
if (nudMemo.Value > 0) 비고 = sheet.readStr(r, (int)nudMemo.Value - 1);
|
||||
if (nudBuwi.Value > 0) 적용부위 = sheet.readStr(r, (int)nudBuwi.Value - 1);
|
||||
if (nudNapKi.Value > 0) 납기일 = sheet.readStr(r, (int)nudNapKi.Value - 1);
|
||||
if (numericUpDown2.Value > 0) 중분류 = sheet.readStr(r, (int)numericUpDown2.Value - 1);
|
||||
|
||||
//필수자료갸ㅏ 없는 경우처리하지 않음
|
||||
if (품명.Trim() == "") continue;
|
||||
@@ -133,7 +153,7 @@ namespace FPJ0000
|
||||
newdr.wdate = DateTime.Now;
|
||||
newdr.import = true;
|
||||
newdr.Project = this.ProjectIndex;
|
||||
|
||||
|
||||
if (no != "") newdr.no = int.Parse(no);
|
||||
newdr.ItemSid = SID;
|
||||
newdr.ItemName = 품명;
|
||||
@@ -157,6 +177,7 @@ namespace FPJ0000
|
||||
}
|
||||
}
|
||||
|
||||
newdr.ItemGroup = 중분류;
|
||||
newdr.option1 = 적용부위;
|
||||
newdr.option2 = 납기일;
|
||||
newdr.ItemGroup = 그룹;
|
||||
@@ -174,7 +195,7 @@ namespace FPJ0000
|
||||
//
|
||||
book = null;
|
||||
|
||||
sbSum.Text = string.Format("합계:{0:N0}원",sumamt);
|
||||
sbSum.Text = string.Format("합계:{0:N0}원", sumamt);
|
||||
//this.bs.DataSource = dt;
|
||||
//this.bn.BindingSource = this.bs;
|
||||
//this.dataGridView1.AutoGenerateColumns = true;
|
||||
@@ -209,7 +230,7 @@ namespace FPJ0000
|
||||
private void toolStripButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
//저장버튼
|
||||
if (dsPRJ.ProjectsPart.Rows.Count < 1)
|
||||
if (dsPRJ.ProjectsPart.Rows.Count < 1)
|
||||
{
|
||||
FCOMMON.Util.MsgE("등록 가능한 자료가 없습니다.");
|
||||
return;
|
||||
@@ -234,7 +255,7 @@ namespace FPJ0000
|
||||
var dlg = FCOMMON.Util.MsgQ("파트리스트를 모두 삭제하시겠습니까?");
|
||||
if (dlg != System.Windows.Forms.DialogResult.Yes) return;
|
||||
var cnt = ta.DeleteProject(this.ProjectIndex);
|
||||
FCOMMON.Util.MsgI(string.Format("{0}건의 자료가 삭제 되었습니다.",cnt));
|
||||
FCOMMON.Util.MsgI(string.Format("{0}건의 자료가 삭제 되었습니다.", cnt));
|
||||
|
||||
}
|
||||
|
||||
@@ -243,7 +264,7 @@ namespace FPJ0000
|
||||
var dlg = FCOMMON.Util.MsgQ("가져온 파트리스트 자룔를 모두 삭제하시겠습니까?");
|
||||
if (dlg != System.Windows.Forms.DialogResult.Yes) return;
|
||||
var cnt = ta.DeleteImport(this.ProjectIndex);
|
||||
FCOMMON.Util.MsgI(string.Format("{0}건의 자료가 삭제 되었습니다.",cnt));
|
||||
FCOMMON.Util.MsgI(string.Format("{0}건의 자료가 삭제 되었습니다.", cnt));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user