public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PayStudent payStudent = db.PayStudent.Where(i => i.PayingId == id).FirstOrDefault(); if (payStudent == null) { return(HttpNotFound()); } return(View(payStudent)); }
public void SortPayStudents(string hdr, PayStudent[] temp) { switch (hdr) { case "Student": Array.Sort(temp, new PayStudent.ComparerByStudent()); break; case "Day": Array.Sort(temp, new PayStudent.ComparerByDay()); break; case "Sum": Array.Sort(temp, new PayStudent.ComparerBySum()); break; default: Record.NeedToReverse = false; break; } if (Record.NeedToReverse) Array.Reverse(temp); }