public ActionResult Edit(string id, FinancialAidAmt finAid) { try { using (FCModels finAidAmtModel = new FCModels()) { finAidAmtModel.Entry(finAid).State = EntityState.Modified; finAidAmtModel.SaveChanges(); } return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(FinancialAidAmt finAid) { try { using (FCModels finAidAmtModel = new FCModels()) { finAidAmtModel.FinancialAidAmt.Add(finAid); finAidAmtModel.SaveChanges(); } return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Delete(string id, FormCollection collection) { try { using (FCModels finAidAmtModel = new FCModels()) { FinancialAidAmt finAid = finAidAmtModel.FinancialAidAmt.Where(x => x.finAidName == id).FirstOrDefault(); finAidAmtModel.FinancialAidAmt.Remove(finAid); finAidAmtModel.SaveChanges(); } return(RedirectToAction("Index")); } catch { return(View()); } }