public ActionResult DeleteConfirmed(int id) { HZ_Customer hZ_Customer = db.HZ_Customer.Find(id); db.HZ_Customer.Remove(hZ_Customer); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "BossProccessDate,CustomerKey,CustomerType,CustomerName,ServiceMember,DriverID,DriverIDIssueDate,DriverIDExpirationDate,DriverIDIssueState,PassPortID,PassPortIssueDate,PassPortExpirationDate,PassPortIssueCountry,TaxpayerIDMasked,TaxpayerIDFull,ForeignTaxID,Address1StreetNumber,Address1StreetName,City,State,Zipcode,Zipcode_plus_4,ForeignCountryCode,ForeignPostalCode,CommentLine,CreditBureauReportCode,Prefix,ProfessionalDesignation,FirstName,MiddleName,LastName,Suffix,NonPersonalNameLine1,NonPersonalNameLine2,RegOCode,Status,InactiveDate,BranchCode,Branch,CommSpecUseNbr,IVRAccessFlag,InternetAccessFlag,InternetAddress,DateOfBirth,LastCustomerContactDate,DateCustomerAdded,LostCustomerDate,HomePhone,CellPhone,BusinessPhone,Privacy_Sharing_Option,LoadedDate")] HZ_Customer hZ_Customer) { if (ModelState.IsValid) { db.Entry(hZ_Customer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(hZ_Customer)); }
// GET: HZ_Customer/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HZ_Customer hZ_Customer = db.HZ_Customer.Find(id); if (hZ_Customer == null) { return(HttpNotFound()); } return(View(hZ_Customer)); }
// GET: HZ_Customer/Details/5 public ActionResult ProductsServicesOfCustomer(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HZ_Customer hZ_Customer = db.HZ_Customer.Find(id); if (hZ_Customer == null) { return(HttpNotFound()); } IEnumerable <HZ_Cards> cards = db.HZ_Cards.Where(x => x.PrimaryCustomerKey == id).ToList(); ViewData["Cards"] = cards; IEnumerable <HZ_CD_IRA> ira = db.HZ_CD_IRA.Where(x => x.PrimaryCustomerKey == id).ToList(); ViewData["IRA"] = ira;//db.HZ_CD_IRA.Where(x => x.PrimaryCustomerKey == id).ToList(); IEnumerable <HZ_DD_SV> sv = db.HZ_DD_SV.Where(x => x.PrimaryCustomerKey == id).ToList(); ViewData["SV"] = sv; IEnumerable <HZ_LN> ln = db.HZ_LN.Where(x => x.PrimaryCustomerKey == id).ToList(); ViewData["LN"] = ln;// db.HZ_LN.Where(x => x.PrimaryCustomerKey == id).ToList(); IEnumerable <HZ_ML> ml = db.HZ_ML.Where(x => x.PrimaryCustomerKey == id).ToList(); ViewData["ML"] = ml;// db.HZ_ML.Where(x => x.PrimaryCustomerKey == id).ToList(); IEnumerable <HZ_SafeDepBox> depositBox = db.HZ_SafeDepBox.Where(x => x.PrimaryCustomerKey == id).ToList(); ViewData["depositBox"] = depositBox;// db.HZ_SafeDepBox.Where(x => x.PrimaryCustomerKey == id).ToList(); return(View(hZ_Customer)); }