전자실 구매관련 업데이트

This commit is contained in:
chi
2023-11-06 09:50:39 +09:00
parent adee51915b
commit f14de05f94
22 changed files with 2436 additions and 643 deletions

View File

@@ -1,4 +1,5 @@
using FCOMMON;
using FarPoint.Win.Spread;
using FCOMMON;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -97,6 +98,23 @@ namespace FEQ0000
//기준값이 없다면 기본값으로 설정한다
if (nudPumName.Value == 0 && nudSid.Value == 0 && nudPdate.Value == 0)
linkLabel3_LinkClicked(null, null);
if (this.crmode == eImporttype.EB)
{
nudPo.Value = 0;
nudCr.Value = 0;
//nudInDate.Value = 0;
nudRecv.Value = 0;
nudCost.Value = 0;
nudLine.Value = 0;
nudMan.Value = 0;
nudAdm.Value = 0;
cbManuProc.Enabled = false;
cbEQManu.Enabled = false;
cbEQModel.Enabled = false;
nudSc.Value = 0;
}
}
void __Closed(object sender, FormClosedEventArgs e)
@@ -272,9 +290,9 @@ namespace FEQ0000
{
itemCount += 1;
// dr.request = userNo;
dr.asset = cbEQModel.Text;
dr.dept = cbEQManu.Text;
dr.manuproc = cbManuProc.Text;
//dr.asset = cbEQModel.Text; //안씀
//dr.dept = cbEQManu.Text;
//dr.manuproc = cbManuProc.Text;
dr.process = cbProcess.Text.Trim();
dr.state = cmbState.Text.Trim();
// dr.pdate = dtPdate.Value.ToShortDateString();
@@ -313,7 +331,7 @@ namespace FEQ0000
return false;
}
if (tbProject.Text == "")
if (crmode != eImporttype.EB && tbProject.Text == "")
{
var dlg = FCOMMON.Util.MsgQ("프로젝트가 입력되지 않았습니다. 진행할까요?");
if (dlg != DialogResult.Yes)
@@ -322,40 +340,34 @@ namespace FEQ0000
return false;
}
}
if (crmode != eImporttype.CR && this.cbProcess.Text.isEmpty() == true)
if (crmode == eImporttype.NR && this.cbProcess.Text.isEmpty() == true)
{
{
FCOMMON.Util.MsgE("[공정]을 선택하세요\n\n" +
"선택 대상이 없는 경우 문의 바랍니다.\n\n" +
"BongSeok Jung(T.7191)\n" +
"BongSeok.Jung@amkor.co.kr");
"선택 대상이 없는 경우 관리자 문의 바랍니다.");
cbProcess.Focus();
return false;
}
}
if (crmode != eImporttype.CR && cbManuProc.Text.isEmpty() == true)
if (crmode == eImporttype.NR && cbManuProc.Text.isEmpty() == true)
{
{
FCOMMON.Util.MsgE("제조공정을 선택하세요\n\n" +
"선택 대상이 없는 경우 문의 바랍니다.\n\n" +
"BongSeok Jung(T.7191)\n" +
"BongSeok.Jung@amkor.co.kr");
"선택 대상이 없는 경우 관리자 문의 바랍니다.");
cbManuProc.Focus();
return false;
}
}
if (crmode != eImporttype.CR && this.cbEQManu.Text.isEmpty() == true)
if (crmode == eImporttype.NR && this.cbEQManu.Text.isEmpty() == true)
{
{
FCOMMON.Util.MsgE("장비 제조사를 선택하세요.\n\n" +
"선택 대상이 없는 경우 문의 바랍니다.\n\n" +
"BongSeok Jung(T.7191)\n" +
"BongSeok.Jung@amkor.co.kr");
"선택 대상이 없는 경우 관리자 문의 바랍니다.");
cbEQManu.Focus();
return false;
}
@@ -436,7 +448,7 @@ namespace FEQ0000
{
System.Text.StringBuilder sb = new StringBuilder();
for (int r = MinRow; r <= MaxRow; r++)
{
progressBar1.Value += 1;
@@ -531,7 +543,19 @@ namespace FEQ0000
if (nudInDate.Value > 0)
{
if (cf_입고일 == libxl.CellType.CELLTYPE_STRING) = sheet.readStr(r, (int)nudInDate.Value - 1).Trim();
if (cf_입고일 == libxl.CellType.CELLTYPE_STRING)
{
= sheet.readStr(r, (int)nudInDate.Value - 1).Trim();
if(DateTime.TryParse(,out DateTime indatevalue)==false)
{
sb.AppendLine("입고일을 확인할 수 없어 입력하지 않습니다\n" +
$"줄번호:{r},입고일자료:{입고일}");
continue;
} else
{
= indatevalue.ToShortDateString();
}
}
else if (cf_입고일 == libxl.CellType.CELLTYPE_NUMBER)
{
= sheet.readNum(r, (int)nudInDate.Value - 1).ToString();
@@ -611,6 +635,10 @@ namespace FEQ0000
else v_공급처 = ;
}
if (.Length >= 200) = .Substring(0, 200 - 4) + "...";
if (.Length >= 500) = .Substring(0, 500 - 4) + "...";
if (.Length >= 200) = .Substring(0, 200 - 4) + "...";
//리스트뷰에 추가
@@ -671,7 +699,7 @@ namespace FEQ0000
newitem.Tag = newdr;
this.dsPRJ.EETGW_PurchaseCR.AddEETGW_PurchaseCRRow(newdr);
}
else if(crmode == eImporttype.NR)
else if (crmode == eImporttype.NR)
{
var newdr = this.dsPRJ.Purchase.NewPurchaseRow();
newdr.wuid = FCOMMON.info.Login.no;
@@ -735,6 +763,10 @@ namespace FEQ0000
}
//this.dsPRJ.ProjectsPart.AcceptChanges();
if(sb.Length > 0)
{
Util.MsgE(sb.ToString());
}
}
catch (Exception ex)
{
@@ -743,7 +775,7 @@ namespace FEQ0000
//
book = null;
sbSum.Text = string.Format("합계:{0:N0}원", sumamt);
sbSum.Text = $"합계:{sumamt:N0}원,{this.dsPRJ.EETGW_PurchaseEB.Rows.Count}건";
//this.bs.DataSource = dt;
//this.bn.BindingSource = this.bs;
//this.dataGridView1.AutoGenerateColumns = true;
@@ -755,6 +787,7 @@ namespace FEQ0000
{
FCOMMON.Util.MsgE("입력된 자료가 없습니다.\n\n지정된 엑셀의 1번째 칸에 값이 없다면 입력되지 않습니다.");
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
@@ -838,6 +871,23 @@ namespace FEQ0000
nudLine.Value = idx++;
nudMan.Value = idx++;
nudAdm.Value = idx++;
if (this.crmode == eImporttype.EB)
{
nudPo.Value = 0;
nudCr.Value = 0;
//nudInDate.Value = 0;
nudRecv.Value = 0;
nudCost.Value = 0;
nudLine.Value = 0;
nudMan.Value = 0;
nudAdm.Value = 0;
cbManuProc.Enabled = false;
cbEQManu.Enabled = false;
cbEQModel.Enabled = false;
nudSc.Value = 0;
}
}
private void label25_Click(object sender, EventArgs e)