public ActionResult DeleteConfirmed(int id) { Fnc_Cost_Timing fnc_Cost_Timing = db.Fnc_Cost_Timing.Find(id); Mstr_Entry_Period_Type mstr_Entry_Period_Type = db.Mstr_Entry_Period_Type.Where(ept => ept.Entry_Period_Type_Id == fnc_Cost_Timing.Entry_Period_Type_Id).First(); db.Fnc_Cost_Timing.Remove(fnc_Cost_Timing); db.SaveChanges(); return(RedirectToAction("Index", new { Entry_Year_Id = fnc_Cost_Timing.Entry_Year_Id, Entry_Period_Type_Id = mstr_Entry_Period_Type.Entry_Period_Type_Id })); }
public ActionResult DeleteConfirmed(int id) { Fnc_Cost_Regular fnc_Cost_Regular = db.Fnc_Cost_Regular.Find(id); Mstr_Class_Program mstr_Class_Program = db.Mstr_Class_Program.Where(cp => cp.Class_Prog_Id == fnc_Cost_Regular.Class_Prog_Id).First(); Mstr_Entry_Period_Type mstr_Entry_Period_Type = db.Mstr_Entry_Period_Type.Where(ept => ept.Entry_Period_Type_Id == fnc_Cost_Regular.Entry_Period_Type_Id).First(); db.Fnc_Cost_Regular.Remove(fnc_Cost_Regular); db.SaveChanges(); return(RedirectToAction("Index", new { Class_Prog_Id = mstr_Class_Program.Class_Prog_Id, Term_Year_Id = fnc_Cost_Regular.Term_Year_Id, Department_Id = fnc_Cost_Regular.Department_Id, Entry_Period_Type_Id = mstr_Entry_Period_Type.Entry_Period_Type_Id })); }