コード例 #1
0
ファイル: BL_Sales.cs プロジェクト: har9421/BestSeller
        /// <summary>
        /// This method is used to save Cash payment details.
        /// </summary>
        /// <param name="Info"></param>
        public static void SavePaymnetCash(PaymentModecashInfo Info)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_Sales_PaymentModeCash";
                ParameterCollection.Add(new clsParameter("@Amount", Info.Amount));
                ParameterCollection.Add(new clsParameter("@Discount", Info.Discount));
                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;
            }
        }
コード例 #2
0
        /// <summary>
        /// This method is used to save sold vouchers dertails nand save Cash payement details.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSaveCash_Click(object sender, EventArgs e)
        {
            try
            {
                //SaveCustomerInfo();
                string STID = SaveVouchers();

                PaymentModecashInfo CashInfo = new PaymentModecashInfo();
                CashInfo.Amount = int.Parse(CashtxtAmount.Text);
                CashInfo.Discount = int.Parse(CashtxtDiscount.Text);
                CashInfo.NetAmount = int.Parse(CashtxtNetAmount.Text);
                CashInfo.STID = STID;

                BL_Sales.SavePaymnetCash(CashInfo);
                SalesParentObj.BindGrid();
            }
            catch (Exception EX)
            {

            }
        }