public ActionResult Post(LeaveRequestFormViewModel data)
 {
     data.LeaveRequestForm.ParentApproval = data.Parentapproval == "1"?true:false;
     data.LeaveRequestForm.Date           = DateTime.Now;
     unitOfWork.LeaveRequestFormRepository.Insert(data.LeaveRequestForm);
     unitOfWork.Save();
     return(Redirect("/LeaveRequestForm/Index"));
 }
        // GET: LeaveRequestForm
        public ActionResult Index()
        {
            LeaveRequestFormViewModel obj = new LeaveRequestFormViewModel();

            obj.StudentSelectListItems        = LoadStudents();
            obj.ParentApprovalSelectListItems = ParentApproval();
            return(View(obj));
        }