public async Task <ActionResult> Register(RegisterViewModel model) { if (ModelState.IsValid) { var user = new ApplicationUser() { UserName = model.UserName, BranchCode = model.BranchCode }; var result = await UserManager.CreateAsync(user, model.Password); if (result.Succeeded) { // await SignInAsync(user, isPersistent: false); //return RedirectToAction("Index", "Home"); } else { AddErrors(result); } } ViewBag.BranchName = DAFacade.GetBranchNameListForDropdown(string.Empty); // If we got this far, something failed, redisplay form return(View(model)); }
public ActionResult UserList() { List <AspNetUsersEntity> lstEntity = new List <AspNetUsersEntity>(); lstEntity = DAFacade.GetAspNetUsersListByFilter(string.Empty); return(View(lstEntity.ToList())); }
// GET: /Reports/ public ActionResult Index() { List <SalaryPeriodEntity> lstSalaryPeriod = new List <SalaryPeriodEntity>(); lstSalaryPeriod = DAFacade.GetSalaryPeriodForDropDown(string.Empty); ViewBag.SalaryPeriod = lstSalaryPeriod.ToList(); return(View()); }
public ActionResult Index() { List <StructureTypeEntity> lstStructureType = new List <StructureTypeEntity>(); lstStructureType = DAFacade.GetStructureTypeListByFilter(string.Format("ScaleYear='2009'")); ViewBag.StructureType = lstStructureType.ToList(); return(View()); }
public PartialViewResult GetBranchInfo(string branchName) { try { List <SalaryFixationEntity> lstSalaryFixation = DAFacade.GetSalaryFixationList(string.Format("PostingPlace='{0}'", branchName)); return(PartialView("_BranchInfo", lstSalaryFixation)); } catch (Exception) { throw; } }
public PartialViewResult Calculate(string grade, decimal basic, int numberOfChild, int locationID) { try { List <SalaryFixationEntity> lstSalaryFixation = DAFacade.CalculateSalaryFix(grade, basic, numberOfChild, locationID); return(PartialView("_Calculate", lstSalaryFixation)); } catch (Exception) { throw; } }
public ActionResult BatchView() { if (HttpContext.User.Identity.Name.ToLower() == "admin") { ViewBag.BranchName = DAFacade.GetBranchNameListForDropdown(string.Empty); } else { ApplicationDbContext _ctx = new ApplicationDbContext(); ApplicationUser branchCode = _ctx.Users.Where(u => u.UserName == HttpContext.User.Identity.Name).FirstOrDefault(); ViewBag.BranchName = DAFacade.GetBranchNameListForDropdown(string.Format("BranchCode='{0}'", branchCode.BranchCode)); } return(View()); }
public PartialViewResult GetIndividualSalaryFixationInfo(string empCode) { try { string currentUserBranchCode = string.Empty; if (HttpContext.User.Identity.Name.ToLower() == "admin") { currentUserBranchCode = "admin"; } else { ApplicationDbContext _ctx = new ApplicationDbContext(); ApplicationUser branchCode = _ctx.Users.Where(u => u.UserName == HttpContext.User.Identity.Name).FirstOrDefault(); currentUserBranchCode = branchCode.BranchCode; } List <SalaryFixationEntity> lstSalaryFixation = DAFacade.GetSalaryFixationList(string.Format("EmpCode='{0}' and BranchCode = case when '{1}' = 'admin' then BranchCode else '{1}' end", empCode, currentUserBranchCode)); return(PartialView("_IndividualSalaryFixationInfo", lstSalaryFixation)); } catch (Exception) { throw; } }
public ActionResult Register() { ViewBag.BranchName = DAFacade.GetBranchNameListForDropdown(string.Empty); return(View()); }