구매신청화면에서 콤보를 버튼으로 변경하고 db검색 validation 기능 추가, 품목 추가시 sid검색기능도 추가 함
This commit is contained in:
@@ -19,7 +19,8 @@ namespace FEQ0000
|
||||
dsPurchase.EETGW_PurchaseCRRow dr;
|
||||
public Boolean repeatAdd = false;
|
||||
Boolean binit = false;
|
||||
string sidchk = string.Empty;
|
||||
string sidchk1 = string.Empty;
|
||||
string dbchk1 = string.Empty;
|
||||
|
||||
public fPurchaseCR_Add(dsPurchase.EETGW_PurchaseCRRow dr_)
|
||||
{
|
||||
@@ -206,6 +207,15 @@ namespace FEQ0000
|
||||
|
||||
cmbState.Text = dr.state;
|
||||
|
||||
//230728
|
||||
if (dr.IscostcenterNull() == false)
|
||||
tbCostCenter.Text = dr.costcenter;
|
||||
else tbCostCenter.Text = string.Empty;
|
||||
if (dr.IslinecodeNull() == false)
|
||||
tbLineCode.Text = dr.linecode;
|
||||
else tbLineCode.Text = string.Empty;
|
||||
|
||||
|
||||
|
||||
//if (dr.process == "") cbProcess.SelectedIndex = -1;
|
||||
//else cbProcess.Text = dr.process;
|
||||
@@ -287,9 +297,9 @@ namespace FEQ0000
|
||||
binit = true;
|
||||
|
||||
if (dr.RowState == DataRowState.Detached || dr.RowState == DataRowState.Added)
|
||||
sidchk = string.Empty;
|
||||
sidchk1 = string.Empty;
|
||||
else
|
||||
sidchk = tbSID.Text;
|
||||
sidchk1 = tbSID.Text;
|
||||
|
||||
timer1.Start();
|
||||
|
||||
@@ -343,6 +353,8 @@ namespace FEQ0000
|
||||
{
|
||||
if (search == "" && allowAll == false)
|
||||
{
|
||||
dbchk1 = string.Empty;
|
||||
sidchk1 = string.Empty;
|
||||
FCOMMON.Util.MsgE("품명은 필수 값 입니다");
|
||||
tbPumName.Focus();
|
||||
return;
|
||||
@@ -352,6 +364,8 @@ namespace FEQ0000
|
||||
var f = new FCM0000.fLovItem(search);
|
||||
if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
dbchk1 = f.itemName;
|
||||
|
||||
//인덱스값이 다르면 모델 및 가격을 업데이트 한다.
|
||||
tbPumName.Text = f.itemName;
|
||||
tbPumName.Tag = f.itemName;
|
||||
@@ -449,6 +463,24 @@ namespace FEQ0000
|
||||
this.Validate();
|
||||
|
||||
tbSID.Text = sidTrim(tbSID.Text);
|
||||
|
||||
if (dbchk1.isEmpty())
|
||||
{
|
||||
Util.MsgE("품목 검사가 진행되지 않았습니다\n품명을 입력한 후 엔터를 누르거나 [품명] 버튼을 눌러서 검색을 수행한 후 다시 시도하세요");
|
||||
tbPumName.Focus();
|
||||
Lov_Item(tbPumName.Text, true);
|
||||
return false;
|
||||
}
|
||||
|
||||
//시드검사한 자료와 현재 입력된 시드가 다르면 검사를 다시 하게 한다
|
||||
if (this.tbPumName.Text.Trim().Equals(this.dbchk1) == false)
|
||||
{
|
||||
Util.MsgE("품명검사 자료가 변경되었습니다. 다시 검사 하세요");
|
||||
Lov_Item("", true);
|
||||
dbchk1 = string.Empty;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (tbSID.TextLength != 9)
|
||||
{
|
||||
FCOMMON.Util.MsgE("SID(9자리)를 확인 하세요");
|
||||
@@ -463,7 +495,7 @@ namespace FEQ0000
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(this.sidchk))
|
||||
if (string.IsNullOrWhiteSpace(this.sidchk1))
|
||||
{
|
||||
FCOMMON.Util.MsgE("SID검사가 필요합니다.\n상단의 검사 버튼을 눌러 SPR/NR 재고 여부를 확인 하세요");
|
||||
btSIDChk.Focus();
|
||||
@@ -471,10 +503,10 @@ namespace FEQ0000
|
||||
}
|
||||
|
||||
//시드검사한 자료와 현재 입력된 시드가 다르면 검사를 다시 하게 한다
|
||||
if (this.tbSID.Text.Trim().Equals(this.sidchk) == false)
|
||||
if (this.tbSID.Text.Trim().Equals(this.sidchk1) == false)
|
||||
{
|
||||
Util.MsgE("SID검사 자료가 변경되었습니다. 다시 검사 하세요");
|
||||
sidchk = string.Empty;
|
||||
sidchk1 = string.Empty;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -715,6 +747,9 @@ namespace FEQ0000
|
||||
dr.supply = tbSupply.Text;
|
||||
dr.place = tbStorage.Text;
|
||||
|
||||
dr.costcenter = tbCostCenter.Text;
|
||||
dr.linecode = tbLineCode.Text;
|
||||
|
||||
if (tbSupplyIndex.Text == "") dr.SetsupplyidxNull();
|
||||
else dr.supplyidx = int.Parse(tbSupplyIndex.Text);
|
||||
|
||||
@@ -905,20 +940,6 @@ namespace FEQ0000
|
||||
Lov_Project("", true);
|
||||
}
|
||||
|
||||
private void button7_Click(object sender, EventArgs e)
|
||||
{
|
||||
var datapath = FCOMMON.DBM.getCodeSvalue("55", "02");
|
||||
if (datapath.isEmpty())
|
||||
{
|
||||
FCOMMON.Util.MsgE("견적서 기본폴더 공용코드 55-02 값을 입력하세요");
|
||||
return;
|
||||
}
|
||||
string path = System.IO.Path.Combine(datapath, DateTime.Now.Year.ToString("0000") + "년");// "\\\\k4fs3201n\\ee1t$\\1. 장비기술1파트\\24_Project & Overhaul 예산 사용 실적\\구매 견적서\\" + DateTime.Now.Year.ToString("0000") + "년";
|
||||
if (System.IO.Directory.Exists(path) == false)
|
||||
FCOMMON.Util.RunExplorer(datapath);
|
||||
else
|
||||
FCOMMON.Util.RunExplorer(path);
|
||||
}
|
||||
|
||||
private void tbDolloerPrice_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -971,7 +992,7 @@ namespace FEQ0000
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(sidchk))
|
||||
if (string.IsNullOrWhiteSpace(sidchk1))
|
||||
{
|
||||
if (btSIDChk.BackColor == Color.Lime)
|
||||
btSIDChk.BackColor = Color.White;
|
||||
@@ -1007,18 +1028,33 @@ namespace FEQ0000
|
||||
if (f.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
dr.chk1 = true;
|
||||
this.sidchk = sid;
|
||||
this.sidchk1 = sid;
|
||||
}
|
||||
else
|
||||
{
|
||||
FCOMMON.Util.MsgE("목록표시 창에서 '확인' 버튼을 눌러야 SID검색이 완료됩니다.");
|
||||
Util.MsgE("목록표시 창에서 '확인' 버튼을 눌러야 SID검색이 완료됩니다.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FCOMMON.Util.MsgI("SPM/NR 에서 검색된 정보가 없습니다\n저장이 가능 합니다");
|
||||
this.sidchk = sid;
|
||||
Util.MsgI("SPM/NR 에서 검색된 정보가 없습니다\n저장이 가능 합니다");
|
||||
this.sidchk1 = sid;
|
||||
}
|
||||
}
|
||||
|
||||
private void button7_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
var datapath = FCOMMON.DBM.getCodeSvalue("55", "02");
|
||||
if (datapath.isEmpty())
|
||||
{
|
||||
FCOMMON.Util.MsgE("견적서 기본폴더 공용코드 55-02 값을 입력하세요");
|
||||
return;
|
||||
}
|
||||
string path = System.IO.Path.Combine(datapath, DateTime.Now.Year.ToString("0000") + "년");// "\\\\k4fs3201n\\ee1t$\\1. 장비기술1파트\\24_Project & Overhaul 예산 사용 실적\\구매 견적서\\" + DateTime.Now.Year.ToString("0000") + "년";
|
||||
if (System.IO.Directory.Exists(path) == false)
|
||||
FCOMMON.Util.RunExplorer(datapath);
|
||||
else
|
||||
FCOMMON.Util.RunExplorer(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user