public ActionResult Edit([Bind(Include = "CompanyId,CompanyName,VATNumber")] CompanyViewModel companyViewModel) { if (ModelState.IsValid) { db.Entry(companyViewModel).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(companyViewModel)); }
public ActionResult Edit([Bind(Include = "ID,EmployeeName,Surname,BirthDate,IdentificationNumber,Address,Telephone")] HREmployee hREmployee) { if (ModelState.IsValid) { db.Entry(hREmployee).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(hREmployee)); }
public ActionResult Edit([Bind(Include = "ID,FK_DefContactReferenceTypeID,FK_ReferenceID,FullName,Email,Address,Position,Telephone,Telephone1,Mobile,Mobile1,Fax,FK_CreatorID,CreationDate,LastModifiedDate")] DefContact defContact) { if (ModelState.IsValid) { db.Entry(defContact).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("")); } ViewBag.FK_DefContactReferenceTypeID = new SelectList(db.DefContactReferenceTypes, "ID", "ContactReferenceTypeName", defContact.FK_DefContactReferenceTypeID); return(View(defContact)); }
public ActionResult Edit([Bind(Include = "ID,FK_DefContactReferenceTypeID,FK_ReferenceID,FullName,Email,Address,Position,Telephone,Telephone1,Mobile,Mobile1,Fax,ContactReferenceTypeName")] DefContact defcontact) { if (ModelState.IsValid) { db.Entry(defcontact).State = EntityState.Modified; defcontact.FK_CreatorID = GetCurrUserID(); DateTime nowTimestamp = DateTime.Now; defcontact.LastModifiedDate = nowTimestamp; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(defcontact)); }
public ActionResult Edit([Bind(Include = "ID,ClientName,WebSite,Email,Address,Industry,FK_CreatorID,CreationDate,LastModifiedDate")] DefClient defClient) { if (ModelState.IsValid) { db.Entry(defClient).State = EntityState.Modified; defClient.FK_CreatorID = User.Identity.GetUserId(); defClient.LastModifiedDate = DateTime.Now; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(defClient)); }
public ActionResult Edit([Bind(Include = "ID,FK_DefCompanyID,LeadSerial,LeadName,LeadDate,NewOfficeSize,NewOfficeAddress,ExpectedBudget,FK_DefClientID,FK_DefBrokerID,FK_BrokerDefContactID,FK_DefModuleStatusID,FK_LedLeadSourceID,FK_AssignedByHREmployeeID,FK_AssignedToHREmployeeID,LeadAssignedDate,Notes,FK_CreatorID,CreationDate,LastModifiedDate")] LedLead ledLead) { if (ModelState.IsValid) { ledLead.FK_CreatorID = User.Identity.GetUserId(); DateTime nowTimestamp = DateTime.Now; ledLead.LastModifiedDate = nowTimestamp; db.Entry(ledLead).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_DefBrokerID = new SelectList(db.DefBrokers, "ID", "BrokerName", ledLead.FK_DefBrokerID); ViewBag.FK_DefClientID = new SelectList(db.DefClients, "ID", "ClientName", ledLead.FK_DefClientID); ViewBag.FK_DefCompanyID = new SelectList(db.DefCompanies, "ID", "CompanyName", ledLead.FK_DefCompanyID); ViewBag.FK_BrokerDefContactID = new SelectList(db.DefContacts, "ID", "FullName", ledLead.FK_BrokerDefContactID); ViewBag.FK_DefModuleStatusID = new SelectList(db.DefModuleStatus, "ID", "ModuleStatusName", ledLead.FK_DefModuleStatusID); ViewBag.FK_AssignedByHREmployeeID = new SelectList(db.HREmployees, "ID", "EmployeeName", ledLead.FK_AssignedByHREmployeeID); ViewBag.FK_AssignedToHREmployeeID = new SelectList(db.HREmployees, "ID", "EmployeeName", ledLead.FK_AssignedToHREmployeeID); ViewBag.FK_LedLeadSourceID = new SelectList(db.LedLeadSources, "ID", "LeadSourceName", ledLead.FK_LedLeadSourceID); return(View(ledLead)); }