Example #1
0
        /// <summary>
        /// This method is used to save sold vouchers dertails nand save cheque payement details.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSaveCheque_Click(object sender, EventArgs e)
        {
            try
            {
                //SaveCustomerInfo();
                string STID = SaveVouchers();

                PaymentModeChequeInfo ChequeInfo = new PaymentModeChequeInfo();
                ChequeInfo.ChequeNo = int.Parse(txtChequeNo.Text);
                ChequeInfo.ChequeDate =(DateTime.Parse(txtChequeDate.Text)).ToString("MM/dd/yyyy");
                ChequeInfo.Amount = int.Parse(txtAmount.Text);
                ChequeInfo.Discount = int.Parse(txtDiscount.Text);
                ChequeInfo.NetAmount = int.Parse(txtNetAmount.Text);
                ChequeInfo.BankName = drpBankName.SelectedValue;
                ChequeInfo.BranchName = txtBranchName.Text;
                ChequeInfo.State = drpState.SelectedValue;
                ChequeInfo.City = drpCity.SelectedValue;
                ChequeInfo.STID = STID;

                BL_Sales.SavePaymnetCheque(ChequeInfo);
                SalesParentObj.BindGrid();
            }
            catch (Exception EX)
            {
            }
        }
Example #2
0
        /// <summary>
        /// This method is used to save Cheque payment details.
        /// </summary>
        /// <param name="Info"></param>
        public static void SavePaymnetCheque(PaymentModeChequeInfo Info)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_Sales_PaymentModeCheque";
                ParameterCollection.Add(new clsParameter("@ChequeNo", Info.ChequeNo));
                ParameterCollection.Add(new clsParameter("@ChequeDate", Info.ChequeDate));
                ParameterCollection.Add(new clsParameter("@Amount", Info.Amount));
                ParameterCollection.Add(new clsParameter("@Discount", Info.Discount));
                ParameterCollection.Add(new clsParameter("@BankName", Info.BankName));
                ParameterCollection.Add(new clsParameter("@BranchName", Info.BranchName));
                ParameterCollection.Add(new clsParameter("@State", Info.State));
                ParameterCollection.Add(new clsParameter("@City", Info.City));
                ParameterCollection.Add(new clsParameter("@STID", Info.STID));

                DataAccess.ExecuteNonQuerySp(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }