private void btnReceiveNo_Click(object sender, EventArgs e)
        {
            try
            {
                var frm = new Form_LookupSwine(Pro);

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    LoadData(frm.ReceiveNo);
                    LoadBomItem(bom.bom_code);

                    lblMessage.Text = Constants.PRODUCT_WAITING;
                    int     stock_qty = 0;
                    decimal stock_wgh = 0;

                    //int remain_qty = lblSwineQty.Text.ToInt16() - stock_qty;
                    lblStockQty.Text = stock_qty.ToComma();
                    lblStockWgh.Text = stock_wgh.ToFormat2Decimal();
                    //lblRemainQty.Text = remain_qty.ToComma();
                }
            }
            catch (Exception ex)
            {
                var toastNotification = new Notification("Error", ex.Message, 2, Color.Red, animationMethod, animationDirection);
                toastNotification.Show();
            }
        }
Exemple #2
0
        private void btnReceiveNo_Click(object sender, EventArgs e)
        {
            var frm = new Form_LookupSwine();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadData(frm.ReceiveNo);
            }
        }
Exemple #3
0
 private void btnReceiveNo_Click(object sender, EventArgs e)
 {
     try
     {
         var frm = new Form_LookupSwine(PRODUCT_CODE);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             lblReceiveNo.Text = frm.ReceiveNo;
             LoadData();
             var remain_qty = lblRemainQty.Text.ToInt16();
             btnStart.Enabled = remain_qty == 0 ? false : true;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #4
0
 private void btnReceiveNo_Click(object sender, EventArgs e)
 {
     try
     {
         var frm = new Form_LookupSwine(CoreProductCode);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             lblReceiveNo.Text       = frm.ReceiveNo;
             lblQty.Text             = "";
             lblSelectedProduct.Text = "";
             productSelected         = null;
             LoadProductByProductGroup();
             //var remain_qty = lblRemainQty.Text.ToInt16();
             //btnStart.Enabled = remain_qty == 0 ? false : true;
         }
     }
     catch (Exception ex)
     {
         DisplayNotification("Error", ex.Message, Color.Red);
     }
 }