示例#1
0
        //[Authorize(Roles = "Admin,Client,Employee")]
        public ActionResult BankDetails(bool status = false)
        {
            string        UserId      = User.Identity.GetUserId();
            UserViewModel userdetails = generic.GetUserDetail(UserId);

            ViewBag.UserId          = userdetails.SubscriberId;
            ViewData["UserProfile"] = userdetails;
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(userdetails.SubscriberId).FirstOrDefault();
            //var plandetail = admin.GetUserplanDetails(userdetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();
            //ViewData["plandetail"] = plandetail;

            ViewBag.Result = "Failed";
            if (status == true)
            {
                ViewBag.Result = "Succeeded";
            }
            //if (userdetails.DepartmentId == "BPT")
            //{
            //    var bankdetails = cms.GetBankDetails(UserId);
            //    return View(bankdetails);
            //}
            //else if (userdetails.Role != "Admin")
            //{
            var bankdetails = cms.GetBankDetails(UserId);
            var empdetails  = ems.GetEmployeeBasicDetails(UserId).FirstOrDefault();

            ViewData["EmpDetails"]  = empdetails;
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(userdetails.SubscriberId).FirstOrDefault();
            return(View(bankdetails));
            //}
            //else
            //{
            //    var bankdetails = cms.GetBankDetails(userdetails.SubscriberId);
            //    return View(bankdetails);
            //}
        }