Exemplo n.º 1
0
        public ActionResult PartialClientAccount()
        {
            var             userId          = User.Identity.GetUserId();
            BLClientAccount bLClientAccount = new BLClientAccount();

            bLClientAccount = bLClientAccount.GetByUserId(userId);
            bLClientAccount.CurrencyArray = JsonConvert.DeserializeObject <string[]>(bLClientAccount.Currency);
            bLClientAccount.BankNameArray = JsonConvert.DeserializeObject <string[]>(bLClientAccount.BankName);
            return(PartialView("_partialAccount", bLClientAccount));
        }
Exemplo n.º 2
0
        public ActionResult Account(BLClientAccount bLClientAccount)
        {
            var userId = User.Identity.GetUserId();

            bLClientAccount.CreatedBy = userId;
            bLClientAccount.BankName  = JsonConvert.SerializeObject(bLClientAccount.BankNameArray);
            bLClientAccount.Currency  = JsonConvert.SerializeObject(bLClientAccount.CurrencyArray);
            var result = bLClientAccount.Save();

            return(Json(result.Item2, JsonRequestBehavior.AllowGet));
        }