public ActionResult Edit(ITAdmin itadmin) { if (ModelState.IsValid) { db.Entry(itadmin).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(itadmin)); }
public ActionResult Edit(ProjectManagement projectmanagement) { if (ModelState.IsValid) { db.Entry(projectmanagement).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(projectmanagement)); }
public ActionResult CommentForOutboundcall(OutboundCallReg outboundcallreg) { var elm = _databaseContex.OutboundCallRegs.FirstOrDefault(one => one.Id == outboundcallreg.Id); if (elm != null) { elm.AssignerComment = outboundcallreg.AssignerComment; elm.CallingStatusId = outboundcallreg.CallingStatusId; _databaseContex.OutboundCallRegs.Attach(elm); _databaseContex.Entry(elm).State = EntityState.Modified; } // _databaseContex.OutboundCallRegs.AddOrUpdate(outboundcallreg); _databaseContex.SaveChanges(); return RedirectToAction("OutboundCallforEmp"); }
public ActionResult ConfirmCallHistory(CallHistoryViewModel editedInfo) { var call = _databaseContex.CallRegistrations.Find(editedInfo.Id); if (call != null) { call.OrderCode = editedInfo.OrderCode; call.CallerName = editedInfo.CallerName; call.Address = editedInfo.Address; call.Description = editedInfo.Description; call.CallerEmail = editedInfo.CallerEmail; call.AdminComment = editedInfo.AdminComment; // call.OrderCode = editedInfo.OrderCode; // call.ProductCode = editedInfo.ProductCode; // call.ComplainType = editedInfo.ComplainType; // call.QueryType = editedInfo.QueryType; // call.PaymentMethod = editedInfo.PaymentMethod; // call.DeliveryDate = editedInfo.DeliveryDate; // call.CallTypeId = editedInfo.CallTypeId; // call.CallingStatusId = editedInfo.CallingStatusId; // call.OfficeOwnerId = editedInfo.OfficeOwnerId; // call.JobCategoryId = editedInfo.JobCategoryId; _databaseContex.CallRegistrations.Attach(call); _databaseContex.Entry(call).State = EntityState.Modified; } _databaseContex.SaveChanges(); string role = WebSecurity.CurrentUserName; if (Roles.IsUserInRole("Employee")) { return(RedirectToAction("MyCallHistory", "Employee")); } else { return(RedirectToAction("CallHistory", "Office")); } }