|
@@ -13,7 +13,9 @@ namespace PTMedicalInsurance.Forms
|
|
|
{
|
|
|
public partial class SaleBillInfo : Form
|
|
|
{
|
|
|
- public string entId, code, medicalDrugId, salePkg, unpackCount, drugSalePrice, batchNo;
|
|
|
+ public string entId, code, medicalDrugId, batchNo;
|
|
|
+ public decimal drugSalePrice = 0, unpackCount = 0;
|
|
|
+ public int salePkg = 0;
|
|
|
|
|
|
private void SaleBillInfo_Load(object sender, EventArgs e)
|
|
|
{
|
|
@@ -56,9 +58,9 @@ namespace PTMedicalInsurance.Forms
|
|
|
entId = tb_JRZDBS.Text;
|
|
|
code = tb_ZSM.Text;
|
|
|
medicalDrugId = tb_YBYPBM.Text;
|
|
|
- salePkg = cbb_CLBS.Text.Substring(0, 7);
|
|
|
- unpackCount = tb_CBXSSL.Text;
|
|
|
- drugSalePrice = tb_YPLSJG.Text;
|
|
|
+ salePkg = int.Parse(cbb_CLBS.Text.Substring(0, 7));
|
|
|
+ unpackCount = decimal.Parse(tb_CBXSSL.Text);
|
|
|
+ drugSalePrice = decimal.Parse(tb_YPLSJG.Text);
|
|
|
batchNo = tb_SCPC.Text;
|
|
|
|
|
|
if ((code == "") && (batchNo == ""))
|
|
@@ -68,10 +70,10 @@ namespace PTMedicalInsurance.Forms
|
|
|
}
|
|
|
|
|
|
decimal count;
|
|
|
- count = decimal.Parse(unpackCount);
|
|
|
+ count = unpackCount;
|
|
|
if (cbb_CLBS.SelectedIndex != 0)
|
|
|
{
|
|
|
- if ((count <= 0) || (unpackCount == ""))
|
|
|
+ if ((count <= 0) || (tb_CBXSSL.Text == ""))
|
|
|
{
|
|
|
MessageBox.Show("整包销售时【拆包销售数量】传0,拆零销售时【拆包销售数量】传大于0的整数!");
|
|
|
return;
|
|
@@ -79,8 +81,8 @@ namespace PTMedicalInsurance.Forms
|
|
|
}
|
|
|
|
|
|
decimal price;
|
|
|
- price = decimal.Parse(drugSalePrice);
|
|
|
- if ((price <= 0) || (drugSalePrice == ""))
|
|
|
+ price = drugSalePrice;
|
|
|
+ if ((price <= 0) || (tb_YPLSJG.Text == ""))
|
|
|
{
|
|
|
MessageBox.Show("【药品零售价格】无效!");
|
|
|
return;
|