public ActionResult EditCar(Car car)
 {
     car.Status = Data_Access_Layer.Entities.Enums.StatusCar.Available;
     context.Entry(car).State = EntityState.Modified;
     context.SaveChanges();
     return(RedirectToAction("Index"));
 }
 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 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 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());
        }
예제 #5
0
        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"));
        }