Beispiel #1
0
        public ActionResult QRCode(Guid id)
        {
            MerchantProfileBLL pb = new MerchantProfileBLL();
            var model             = pb.GetMerchantProfileSet(id);

            return(PartialView(model));
        }
Beispiel #2
0
        public ActionResult Detail(Guid id)
        {
            MerchantProfileBLL pb = new MerchantProfileBLL();
            var model             = pb.GetMerchantProfileSet(id);

            model.CountryName = FoundationDB.CountryDb.GetById(model.CountryId).Name;
            return(View(model));
        }
        public ActionResult Detail(Guid id)
        {
            var account = FiiiPayDB.MerchantAccountDb.GetById(id);

            ViewBag.AccountName = account.Username;
            var pro = new MerchantProfileBLL().GetMerchantProfile(id);

            return(View(pro));
        }
Beispiel #4
0
        public ActionResult Detail(Guid id)
        {
            var account = FiiiPayDB.MerchantAccountDb.GetById(id);

            ViewBag.AccountName = account.Username;
            var pro     = new MerchantProfileBLL().GetMerchantProfile(id);
            var profile = ReflectionHelper.AutoCopy <Entities.MerchantProfile, MerchantKYCProfileViewModel>(pro);

            profile.IdentityDocTypeName = profile.IdentityDocType.HasValue ? ((IdentityDocType)profile.IdentityDocType.Value).ToString() : "";
            return(View(profile));
        }
Beispiel #5
0
        public JsonResult LoadData(string account, string sn, int?countryId, int?status, GridPager pager)
        {
            List <MerchantProfile> profileList;
            List <MerchantProfileAccountViewModel> merchantPos;
            string countryName;

            if (string.IsNullOrEmpty(sn))
            {
                if (!countryId.HasValue)
                {
                    return(Json(new List <MerchantProfile>().ToGridJson(pager)));
                }

                profileList = new MerchantProfileBLL().GetMerchantKYCProfilePageListL1(account, countryId.Value, status, ref pager);
                if (profileList == null || profileList.Count <= 0)
                {
                    return(Json(new List <MerchantProfile>().ToGridJson(pager)));
                }

                var merchantIds = profileList.Select(t => t.MerchantId).ToArray();
                countryName = FoundationDB.CountryDb.GetById(countryId)?.Name;
                merchantPos = FiiiPayDB.DB.Queryable <MerchantAccounts, POSs>((u, v) => new object[] { JoinType.Left, u.POSId == v.Id })
                              .Where((u, v) => SqlFunc.ContainsArray <Guid>(merchantIds, u.Id))
                              .Select((u, v) => new MerchantProfileAccountViewModel {
                    MerchantId = u.Id, Cellphone = u.Cellphone, MerchantName = u.MerchantName, SN = v.Sn, Username = u.Username
                }).ToList();
            }
            else
            {
                var pos = FiiiPayDB.POSDb.GetSingle(t => t.Sn == sn);
                if (pos == null)
                {
                    return(Json(new List <MerchantProfile>().ToGridJson(pager)));
                }
                var merchantAccount = FiiiPayDB.MerchantAccountDb.GetSingle(t => t.POSId == pos.Id);
                if (merchantAccount == null)
                {
                    return(Json(new List <MerchantProfile>().ToGridJson(pager)));
                }

                var profile = new MerchantProfileBLL().GetMerchantProfile(merchantAccount.Id);
                if (profile == null)
                {
                    return(Json(new List <MerchantProfile>().ToGridJson(pager)));
                }

                profileList = new List <MerchantProfile> {
                    profile
                };

                profileList = profileList.Where(t =>
                                                (account == null ? true : t.Cellphone.Contains(account)) &&
                                                (countryId.HasValue ? t.Country == countryId.Value : true) &&
                                                (status.HasValue ? (byte)t.L1VerifyStatus == status.Value : true)
                                                ).ToList();

                countryName = FoundationDB.CountryDb.GetById(merchantAccount.CountryId)?.Name;

                merchantPos = new List <MerchantProfileAccountViewModel>
                {
                    new MerchantProfileAccountViewModel
                    {
                        MerchantId   = merchantAccount.Id,
                        MerchantName = merchantAccount.MerchantName,
                        Cellphone    = merchantAccount.Cellphone,
                        Username     = merchantAccount.Username,
                        SN           = pos.Sn
                    }
                };
            }

            var data = profileList.ToGridJson(pager, r =>
                                              new
            {
                id   = r.MerchantId,
                cell = new
                {
                    MerchantId       = r.MerchantId,
                    Username         = merchantPos.Where(t => t.MerchantId == r.MerchantId).Select(t => t.Username).FirstOrDefault(),
                    Cellphone        = r.Cellphone,
                    SN               = merchantPos.Where(t => t.MerchantId == r.MerchantId).Select(t => t.SN).FirstOrDefault(),
                    MerchantName     = merchantPos.Where(t => t.MerchantId == r.MerchantId).Select(t => t.MerchantName).FirstOrDefault(),
                    FirstName        = r.FirstName,
                    LastName         = r.LastName,
                    CountryName      = countryName,
                    L1VerifyStatus   = r.L1VerifyStatus.ToString(),
                    L1SubmissionDate = r.L1SubmissionDate.HasValue ? r.L1SubmissionDate.Value.ToLocalTime().ToString("yyyy-MM-dd HH:mm") : "",
                    Remark           = r.L1Remark,
                    Options          = (int)r.L1VerifyStatus
                }
            });

            return(Json(data));
        }
Beispiel #6
0
        public JsonResult SaveVerify(MerchantProfile profile)
        {
            var sr = new MerchantProfileBLL().SaveMerchantProfileVerifyL1(UserId, UserName, profile);

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