구매신청화면에서 콤보를 버튼으로 변경하고 db검색 validation 기능 추가, 품목 추가시 sid검색기능도 추가 함
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using FCOMMON;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Security.AccessControl;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@@ -60,7 +62,26 @@ namespace FCM0000.Item
|
||||
tbModel.Focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if (tbSid.Text.StartsWith("신규")) tbSid.Text = "신규";
|
||||
else
|
||||
{
|
||||
//이떄는 sid가 정상이어야 한다.
|
||||
if (tbSid.Text.StartsWith("10") == false || tbSid.TextLength != 9)
|
||||
{
|
||||
Util.MsgE("SID는 9자리 숫자이며 10으로 시작 합니다\n입력값을 확인 하세요");
|
||||
tbSid.Focus();
|
||||
tbSid.SelectAll();
|
||||
return;
|
||||
}
|
||||
|
||||
if (ta.ExistSID(FCOMMON.info.Login.gcode, tbSid.Text) > 0)
|
||||
{
|
||||
Util.MsgE("동일한 SID정보가 있습니다\n화면을 닫은 후 SID로 검색하세요");
|
||||
this.Close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var pumName = tbName.Text.Trim();
|
||||
var pumModel = tbModel.Text.Trim();
|
||||
@@ -71,6 +92,10 @@ namespace FCM0000.Item
|
||||
FCOMMON.Util.MsgE("동일 품명 모델의 정보가 존재 합니다");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (tbSupplyIdx.Text == "") tbSupplyIdx.Text = "-1";
|
||||
var newdr = this.dsMSSQL.Items.NewItemsRow();
|
||||
newdr.gcode = FCOMMON.info.Login.gcode;
|
||||
@@ -93,7 +118,7 @@ namespace FCM0000.Item
|
||||
if (decimal.TryParse(tbPriceD.Text, out decimal priced))
|
||||
{
|
||||
newdr.priceD = priced;
|
||||
if(decimal.TryParse(tbPrice.Text,out decimal priceWon)==false)
|
||||
if (decimal.TryParse(tbPrice.Text, out decimal priceWon) == false)
|
||||
{
|
||||
var ConvertedPrice = (decimal)((double)priced * FCOMMON.info.dollertowon);
|
||||
tbPrice.Text = ConvertedPrice.ToString();
|
||||
@@ -135,5 +160,11 @@ namespace FCM0000.Item
|
||||
newIDX = -1;
|
||||
}
|
||||
}
|
||||
|
||||
private void checkBox1_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
tbSid.Enabled = !checkBox1.Enabled;
|
||||
if (checkBox1.Checked) tbSid.Text = "신규";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user