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; }
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); }
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"); } }
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"); } }