public ActionResult CreateViolation(int ReferID, string Reason, string RecordDate, decimal Punish) { var updateBy = (ViewUserAsEmployee)Session["loginuser"]; DateTime date = DateTime.Parse(RecordDate); userManage.CreateNewViolation(new InfoEmployeeViolation { ReferID = ReferID, RecordDate = date, FundsPunish = Punish, ViolateFor = Reason, ManagerID = updateBy.UserID, }); ViewBag.Model = userManage.GetViolations(); return(View()); }