예제 #1
0
 public bool BindData(string strProductCode,string strBranchCode)
 {
     this.strBranchCode=strBranchCode;
     this.strProductCode=strProductCode;
     ACMSLogic.OpenCarton.OpenCarton openCarton = new ACMSLogic.OpenCarton.OpenCarton();
     DataSet ds = openCarton.FindCurrentProductBalance(strProductCode,strBranchCode);
     if(ds!=null)
     {
         if(ds.Tables[0].Rows.Count==1)
         {
             DataTable dt = ds.Tables[0];
             this.txtOpeningBalance.Text = dt.Rows[0]["nQuantity"].ToString();
             return true;
         }
         else
         {
             UI.ShowWarningMessage(this,"No Record Found","No Record");
             return false;
         }
     }
     return false;
 }
예제 #2
0
        public bool BindData(string strProductCode, string strBranchCode)
        {
            this.strBranchCode  = strBranchCode;
            this.strProductCode = strProductCode;
            ACMSLogic.OpenCarton.OpenCarton openCarton = new ACMSLogic.OpenCarton.OpenCarton();
            DataSet ds = openCarton.FindCurrentProductBalance(strProductCode, strBranchCode);

            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count == 1)
                {
                    DataTable dt = ds.Tables[0];
                    this.txtOpeningBalance.Text = dt.Rows[0]["nQuantity"].ToString();
                    return(true);
                }
                else
                {
                    UI.ShowWarningMessage(this, "No Record Found", "No Record");
                    return(false);
                }
            }
            return(false);
        }
예제 #3
0
 private void simpleButton2_Click(object sender, System.EventArgs e)
 {
     ACMSLogic.OpenCarton.OpenCarton openCarton = new ACMSLogic.OpenCarton.OpenCarton();
     try
     {
         int     nquantity = Convert.ToInt32(this.txtOpenCarton.Text) * 24;
         DataSet ds        = openCarton.AddProduct(strProductCode, strBranchCode, nquantity);
         if (ds != null)
         {
             if (ds.Tables.Count == 1)
             {
                 DataTable dt           = ds.Tables[0];
                 string    totalBalance = "Total Balance For Mineral Water = " + dt.Rows[0]["nQuantity"].ToString();
                 UI.ShowMessage(this, totalBalance);
                 this.DialogResult = DialogResult.OK;
                 this.Close();
             }
         }
     }
     catch (Exception err)
     {
         UI.ShowErrorMessage(this, err.Message.ToString(), "Error");
     }
 }
예제 #4
0
 private void simpleButton2_Click(object sender, System.EventArgs e)
 {
     ACMSLogic.OpenCarton.OpenCarton openCarton = new ACMSLogic.OpenCarton.OpenCarton();
     try
     {
         int nquantity=Convert.ToInt32(this.txtOpenCarton.Text) * 24;
         DataSet ds = openCarton.AddProduct(strProductCode,strBranchCode,nquantity);
         if(ds!=null)
         {
             if(ds.Tables.Count==1)
             {
                 DataTable dt = ds.Tables[0];
                 string totalBalance = "Total Balance For Mineral Water = "+dt.Rows[0]["nQuantity"].ToString();
                 UI.ShowMessage(this,totalBalance);
                 this.DialogResult = DialogResult.OK;
                 this.Close();
             }
         }
     }
     catch(Exception err)
     {
         UI.ShowErrorMessage(this,err.Message.ToString(),"Error");
     }
 }