public ActionResult CreateITApplication(ITWorkApplication work) { work.Status = Data_Access_Layer.Entities.Enums.StatusIT.InProcess; db.Entry(work).State = EntityState.Added; db.SaveChanges(); ViewBag.right = true; return(View()); }
public ActionResult CreateClient(Client client) { db.Entry(client.ContactInfo).State = EntityState.Added; db.SaveChanges(); db.Entry(client).State = EntityState.Added; //db.Entry(client.ContactInfo).State = EntityState.Added; db.SaveChanges(); ViewBag.right = true; return(View()); }
public ActionResult CreateCar(Car car) { context.Cars.Add(car); context.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult CreatePayroll(Payroll payroll) { payroll.Status = Data_Access_Layer.Entities.Enums.Status.Waiting; db.Entry(payroll).State = EntityState.Added; db.SaveChanges(); ViewBag.right = true; return(Redirect("/accountant/index/payrolls")); }
public ActionResult AcceptPayroll(int?id) { Payroll payroll = db.Payrolls.Find(id); payroll.Status = Data_Access_Layer.Entities.Enums.Status.Accept; db.Entry(payroll).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }