public ActionResult DeleteConfirmed(int id) { UsersBankAccount usersBankAccount = db.UsersBankAccounts.Find(id); db.UsersBankAccounts.Remove(usersBankAccount); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "AccountId,UserId,Currency,Amount")] UsersBankAccount usersBankAccount) { if (ModelState.IsValid) { db.Entry(usersBankAccount).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.UserId = new SelectList(db.Users, "UserId", "Name", usersBankAccount.UserId); return(View(usersBankAccount)); }
// GET: UsersBankAccounts/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } UsersBankAccount usersBankAccount = db.UsersBankAccounts.Find(id); if (usersBankAccount == null) { return(HttpNotFound()); } return(View(usersBankAccount)); }
// GET: UsersBankAccounts/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } UsersBankAccount usersBankAccount = db.UsersBankAccounts.Find(id); if (usersBankAccount == null) { return(HttpNotFound()); } ViewBag.UserId = new SelectList(db.Users, "UserId", "Name", usersBankAccount.UserId); return(View(usersBankAccount)); }
public void Insert(int UserKey,int CurrencyKey,string BankKey,string BankAccount,DateTime LastChanged,string BankAccountDescription) { UsersBankAccount item = new UsersBankAccount(); item.UserKey = UserKey; item.CurrencyKey = CurrencyKey; item.BankKey = BankKey; item.BankAccount = BankAccount; item.LastChanged = LastChanged; item.BankAccountDescription = BankAccountDescription; item.Save(UserName); }
public void Update(int UsersBankAccountKey,int UserKey,int CurrencyKey,string BankKey,string BankAccount,DateTime LastChanged,string BankAccountDescription) { UsersBankAccount item = new UsersBankAccount(); item.MarkOld(); item.IsLoaded = true; item.UsersBankAccountKey = UsersBankAccountKey; item.UserKey = UserKey; item.CurrencyKey = CurrencyKey; item.BankKey = BankKey; item.BankAccount = BankAccount; item.LastChanged = LastChanged; item.BankAccountDescription = BankAccountDescription; item.Save(UserName); }