Example #1
0
        public void UpdateMerchant(mMerchant merchant)
        {
            using (SqlConnection consql = new SqlConnection(ConfigurationManager.ConnectionStrings["MerchantServiceDB"].ConnectionString))
            {
                consql.Open();

                SqlCommand cmd = new SqlCommand("sp_m_update_merchant", consql);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@MerchantID", merchant.MPU_Merchant_ID);
                cmd.Parameters.AddWithValue("@Merchant_Name", merchant.Merchant_Name);
                cmd.Parameters.AddWithValue("@Merchant_Address", merchant.Merchant_Address);
                cmd.Parameters.AddWithValue("@Merchant_Email", merchant.Merchant_Email);
                cmd.Parameters.AddWithValue("@Merchant_Phone", merchant.Merchant_Phone);
                cmd.Parameters.AddWithValue("@Settlement_Acc", merchant.Settlement_Acc);
                cmd.Parameters.AddWithValue("@SettAccName", merchant.SettAccountName);
                cmd.Parameters.AddWithValue("@OMPURate", merchant.OMPURate);
                cmd.Parameters.AddWithValue("@OJCBRate", merchant.OJCBRate);
                cmd.Parameters.AddWithValue("@OUPIRate", merchant.OUPIRate);
                cmd.Parameters.AddWithValue("@MPURate", merchant.MPURate);
                cmd.Parameters.AddWithValue("@JCBRate", merchant.JCBRate);
                cmd.Parameters.AddWithValue("@UPIRate", merchant.UPIRate);
                cmd.Parameters.AddWithValue("@BusinessCategoryID", merchant.BusinessCategoryID);

                cmd.ExecuteNonQuery();
            }
        }
Example #2
0
        public Double get_mdr_rate_mpunotonus(mMerchant merchant)
        {
            Double MDR = 0;

            using (Models.MerchantService db = new MerchantService())
            {
                t_Merchant_Info merchant_info = new t_Merchant_Info();
                merchant_info = db.t_Merchant_Info.Where(x => x.MPU_Merchant_ID == merchant.MPU_Merchant_ID).SingleOrDefault();
                if (merchant_info != null)
                {
                    MDR = Convert.ToDouble(merchant_info.MPURate);
                }
                else
                {
                    MDR = -123;
                }
            }

            return(MDR);
        }