단가($) 작업
This commit is contained in:
@@ -43,13 +43,13 @@ namespace FCM0000.Item
|
||||
|
||||
private void btOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(tbName.Text.Trim()=="")
|
||||
if (tbName.Text.Trim() == "")
|
||||
{
|
||||
FCOMMON.Util.MsgE("품명은 필수 입니다");
|
||||
FCOMMON.Util.MsgE("품명은 필수 입니다");
|
||||
tbName.Focus();
|
||||
return;
|
||||
}
|
||||
if(tbModel.Text.Trim() == "")
|
||||
if (tbModel.Text.Trim() == "")
|
||||
{
|
||||
FCOMMON.Util.MsgE("모델은 필수 입니다");
|
||||
tbModel.Focus();
|
||||
@@ -59,7 +59,7 @@ namespace FCM0000.Item
|
||||
var pumModel = tbModel.Text.Trim();
|
||||
var searchKey = pumName + pumModel;
|
||||
var cnt = (int)(ta.ExistCheck(FCOMMON.info.Login.gcode, searchKey));
|
||||
if(cnt > 0)
|
||||
if (cnt > 0)
|
||||
{
|
||||
FCOMMON.Util.MsgE("동일 품명 모델의 정보가 존재 합니다");
|
||||
return;
|
||||
@@ -77,14 +77,36 @@ namespace FCM0000.Item
|
||||
newdr.supplyidx = int.Parse(tbSupplyIdx.Text.Trim());
|
||||
newdr.memo = tbMemo.Text.Trim();
|
||||
newdr.cate = "--";
|
||||
|
||||
|
||||
//21711
|
||||
if (tbPriceD.Text.isEmpty() == false)
|
||||
{
|
||||
if (decimal.TryParse(tbPriceD.Text, out decimal priced))
|
||||
{
|
||||
newdr.priceD = priced;
|
||||
if(decimal.TryParse(tbPrice.Text,out decimal priceWon)==false)
|
||||
{
|
||||
var ConvertedPrice = (decimal)((double)priced * FCOMMON.info.dollertowon);
|
||||
tbPrice.Text = ConvertedPrice.ToString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FCOMMON.Util.MsgE("입력값이 숫자가 아닙니다. 단가($)를 사용할 수 없습니다");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int price;
|
||||
int.TryParse(tbPrice.Text, out price);
|
||||
newdr.price = price;
|
||||
|
||||
newdr.scale = 1;
|
||||
newdr.unit = tbUnit.Text.Trim();
|
||||
if (newdr.unit == "") newdr.unit = "EA";
|
||||
newdr.disable = false;
|
||||
newdr.import = "";
|
||||
newdr.import = "";
|
||||
this.dsMSSQL.Items.AddItemsRow(newdr);
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user