public ActionResult History() { var PasgoID = Session["PasgoID"]; if (PasgoID == null) { return(View("Index", "Home")); } var result = db.SimpleHistory(Convert.ToInt32(PasgoID), false).ToList(); List <SimpleHistory_Result> moi = new List <SimpleHistory_Result>(); List <SimpleHistory_Result> cu = new List <SimpleHistory_Result>(); foreach (var item in result) { if (item.TrangThai == "Đang chờ xác nhận") { moi.Add(item); } else { cu.Add(item); } } return(View(Tuple.Create(moi.ToList(), cu.ToList()))); }
public ActionResult Details(string PasgoID, int type) { if (Convert.ToInt32(Session["Level"]) == 1 || Session["Level"] == null) { return(RedirectToAction("Index", "Home")); } FullInfoUser_Result result = db.FullInfoUser(Convert.ToInt32(PasgoID), Convert.ToBoolean(type)).ElementAt(0); List <SimpleHistory_Result> hresult = db.SimpleHistory(Convert.ToInt32(PasgoID), Convert.ToBoolean(type)).ToList(); return(View(Tuple.Create(result, hresult, type))); }