コード例 #1
0
ファイル: BL_Sales.cs プロジェクト: har9421/BestSeller
        /// <summary>
        /// This method is used to save Card payment details.
        /// </summary>
        /// <param name="Info"></param>
        public static void SavePaymnetCard(PaymentModeCardInfo Info)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_Sales_PaymentModeCreditCard";
                ParameterCollection.Add(new clsParameter("@CardType", Info.CardType));
                ParameterCollection.Add(new clsParameter("@CardholderName", Info.CardHolderName));
                ParameterCollection.Add(new clsParameter("@CardNo", Info.CardNumber));
                ParameterCollection.Add(new clsParameter("@Expirydate", Info.ExpiryDate));
                ParameterCollection.Add(new clsParameter("@CCVNo", Info.ApprovalCode));
                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 Card cheque payement details.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSaveCard_Click(object sender, EventArgs e)
        {
            try
            {
                //SaveCustomerInfo();
                string STID = SaveVouchers();

                PaymentModeCardInfo CardInfo = new PaymentModeCardInfo();
                CardInfo.CardType = rbtnVisa.Checked == true ? "Visa" : "Master";
                CardInfo.CardHolderName = txtCardHolder.Text;
                CardInfo.CardNumber = int.Parse(txtCardNo.Text);
                CardInfo.ExpiryDate = (DateTime.Parse(txtExpityDate.Text)).ToString("MM/dd/yyyy");
                CardInfo.ApprovalCode = txtApproval.Text;
                CardInfo.STID = STID;

                BL_Sales.SavePaymnetCard(CardInfo);
                SalesParentObj.BindGrid();
            }
            catch (Exception EX)
            {
            }
        }