public ActionResult LeaveSection(EmployerLeave employerLeave) { if (Session["id"] != null) { employerLeave.applyDate = DateTime.Now; employerLeave.confirmationType = 0; ObjectAssignAndSave.SaveObject(employerLeave); return(RedirectToAction("MyLeave", "Home")); } else { return(RedirectToAction("Login", "Home")); } }
public ActionResult Administrator(EmpMaster empMaster) { if (Session["id"] != null && Convert.ToInt32(Session["type"]) == 1) { if (empMaster != null) { empMaster.enterDate = DateTime.Now; empMaster.empMasterType = 0; empMaster = common.concatAndHashTempMaster(empMaster); ObjectAssignAndSave.SaveObject(empMaster); } return(RedirectToAction("Administrator", "Home")); } else { return(RedirectToAction("Login", "Home")); } }