public ActionResult DeleteConfirmed(int id) { logger.Info("DeleteConfirmed Post Method Start" + " at " + DateTime.UtcNow); logger.Info("Delete Get Method serviceoperatorplan Id" + id + " at " + DateTime.UtcNow); ServiceOperatorPlan serviceoperatorplan = db.ServiceOperatorPlans.Find(id); db.ServiceOperatorPlans.Remove(serviceoperatorplan); db.SaveChanges(); logger.Info("DeleteConfirmed Post serviceoperatorplan removed " + " at " + DateTime.UtcNow); logger.Info("DeleteConfirmed Post Method End " + " at " + DateTime.UtcNow); return(RedirectToAction("Index")); }
// // GET: /ServiceOperatorPlan/Details/5 public ActionResult Details(int id = 0) { logger.Info("Method Start" + " at " + DateTime.UtcNow); logger.Info("ServiceOperator Plan Id" + id + " at " + DateTime.UtcNow); ServiceOperatorPlan serviceoperatorplan = db.ServiceOperatorPlans.Find(id); if (serviceoperatorplan == null) { logger.Info("Service Operator Plan not found " + " at " + DateTime.UtcNow); return(HttpNotFound()); } logger.Info("Method End " + " at " + DateTime.UtcNow); return(View(serviceoperatorplan)); }
// // GET: /ServiceOperatorPlan/Edit/5 public ActionResult Edit(int id = 0) { logger.Info("Edit Get Method Start" + " at " + DateTime.UtcNow); logger.Info("Edit Get Method ServiceOperatorPlan Id " + id + " at " + DateTime.UtcNow); ServiceOperatorPlan serviceoperatorplan = db.ServiceOperatorPlans.Find(id); if (serviceoperatorplan == null) { logger.Info("Edit Get Method serviceoperatorplan not found " + " at " + DateTime.UtcNow); return(HttpNotFound()); } ViewBag.ServiceOperatorId = new SelectList(db.ServiceOperators, "ServiceOperatorId", "OperatorName", serviceoperatorplan.ServiceOperatorId); ViewBag.StateId = new SelectList(db.States, "StateID", "StateName", serviceoperatorplan.StateId); logger.Info("Edit Get Method End " + " at " + DateTime.UtcNow); return(View(serviceoperatorplan)); }
public ActionResult Create(ServiceOperatorPlan serviceoperatorplan) { logger.Info("Create Post Method Start" + " at " + DateTime.UtcNow); if (ModelState.IsValid) { db.ServiceOperatorPlans.Add(serviceoperatorplan); db.SaveChanges(); logger.Info("Create Post Method new serviceoperatorplan created " + " at " + DateTime.UtcNow); return(RedirectToAction("Index")); } ViewBag.ServiceOperatorId = new SelectList(db.ServiceOperators, "ServiceOperatorId", "OperatorName", serviceoperatorplan.ServiceOperatorId); ViewBag.StateId = new SelectList(db.States, "StateID", "StateName", serviceoperatorplan.StateId); logger.Info("Create Post Method End " + " at " + DateTime.UtcNow); return(View(serviceoperatorplan)); }
public ActionResult Edit(ServiceOperatorPlan serviceoperatorplan) { logger.Info("Edit Post Method Start" + " at " + DateTime.UtcNow); logger.Info("Edit Post Method serviceoperatorplan Id" + serviceoperatorplan.ServiceOperatorId + " at " + DateTime.UtcNow); if (ModelState.IsValid) { db.Entry(serviceoperatorplan).State = EntityState.Modified; db.SaveChanges(); logger.Info("Edit Post Method serviceoperatorplan details updated " + " at " + DateTime.UtcNow); return(RedirectToAction("Index")); } ViewBag.ServiceOperatorId = new SelectList(db.ServiceOperators, "ServiceOperatorId", "OperatorName", serviceoperatorplan.ServiceOperatorId); ViewBag.StateId = new SelectList(db.States, "StateID", "StateName", serviceoperatorplan.StateId); logger.Info("Edit Post Method End " + " at " + DateTime.UtcNow); return(View(serviceoperatorplan)); }