public JsonResult LoadData(GridPager pager, string fiiipayAccount, string merchantName, int?countryId, byte?merchantStatus, byte?verifyStatus)
        {
            var list             = new FiiiPayMerchantBLL().GetMerchantPager(fiiipayAccount, merchantName, countryId, merchantStatus, verifyStatus, ref pager);
            var countryList      = GetCountryList();
            var statusList       = GetMerchantStatusList();
            var verifyStatusList = GetVerifyStatusList();
            var allowList        = GetAllowExpenseList();
            var fromTypeList     = GetFromTypeList();
            var obj = list.ToGridJson(pager, r =>
                                      new
            {
                id   = r.Id,
                cell = new
                {
                    r.Id,
                    r.FiiiPayAccount,
                    r.MerchantName,
                    CountryName    = (countryList.ContainsKey(r.CountryId) ? countryList[r.CountryId] : ""),
                    MerchantStatus = statusList[(int)r.Status],
                    VerifyStatus   = verifyStatusList[(int)r.VerifyStatus],
                    AllowExpense   = allowList[r.IsAllowExpense.ToString().ToLower()],
                    FromType       = fromTypeList[r.FromType],
                    Options        = r.VerifyStatus
                }
            });

            return(Json(obj));
        }
        public JsonResult SaveSetting(MerchantInformations info)
        {
            info.FeeRate = Math.Truncate(info.FeeRate * 100) / 10000;
            info.Markup  = Math.Truncate(info.Markup * 100) / 10000;
            var sr = new FiiiPayMerchantBLL().SaveSetting(info.Id, info.Status, info.IsAllowExpense, info.FeeRate, info.Markup);

            return(Json(sr.toJson()));
        }
        public JsonResult SaveEdit(MerchantEditInfoModel model)
        {
            var sr          = new FiiiPayMerchantBLL().SaveEdit(this.UserName, model);
            var countryList = FoundationDB.CountryDb.GetList(t => t.IsSupportStore);

            ViewBag.CountryCodeList = ConvertDicToSelect(countryList.ToDictionary(k => k.Code, v => v.Name_CN), true);
            return(Json(sr.toJson()));
        }
        public JsonResult SaveAdd(MerchantEditInfoModel model, string InviteCode)
        {
            var sr = new FiiiPayMerchantBLL().SaveAdd(this.UserName, model, InviteCode);

            return(Json(sr.toJson()));
        }
        public JsonResult SaveVerify(Guid Id, byte VerifyResult, string VerifyReason)
        {
            var sr = new FiiiPayMerchantBLL().SaveVerify(Id, VerifyResult, VerifyReason, this.UserName);

            return(Json(sr.toJson()));
        }