public ActionResult ClubList(Dictionary <string, string> queryvalues) { string _target = queryvalues.ContainsKey("target") ? queryvalues["target"] : ""; int _id = queryvalues.ContainsKey("SearchExter") ? string.IsNullOrWhiteSpace(queryvalues["SearchExter"]) ? 0 : Convert.ToInt32(queryvalues["SearchExter"]) : 0; int Search = queryvalues.ContainsKey("Search") ? string.IsNullOrWhiteSpace(queryvalues["Search"]) ? 0 : Convert.ToInt32(queryvalues["Search"]) : 0; int _page = queryvalues.ContainsKey("page") ? Convert.ToInt32(queryvalues["page"]) : 1; int page2 = queryvalues.ContainsKey("page2") ? Convert.ToInt32(queryvalues["page2"]) : 1; string _StartDate = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); string _ExpirationDate = queryvalues.ContainsKey("ExpirationDate") ? queryvalues["ExpirationDate"] : DateTime.Now.AddDays(1).ToString("yyyy-MM-dd 00:00:00"); GameRecordView model = new GameRecordView { UserID = _id, SearchExt = Session["name"].ToString(), SearchExter = _id, StartDate = _StartDate, ExpirationDate = _ExpirationDate, Page = _page }; ViewData["pageindex"] = _page; ViewData["pageindex2"] = page2; if (_target == "box") { int _pageGroup = queryvalues.ContainsKey("pageGroup") ? Convert.ToInt32(queryvalues["pageGroup"]) : 1; ViewData["ClubList_PageList"] = ClubBLL.GetMyRebate(model); return(PartialView("ClubList_PageList", ViewData["ClubList_PageList"])); } else if ((_target == "box2")) { ViewData["hid"] = "1"; model.Page = page2; model.SearchExter = Search; model.UserID = Search; ViewData["ClubListDetail"] = ClubBLL.GetMyRebateDetail(model); return(PartialView("ClubListDetail", ViewData["ClubListDetail"])); } else { int btn = queryvalues.ContainsKey("btn") ? string.IsNullOrWhiteSpace(queryvalues["btn"]) ? 0 : Convert.ToInt32(queryvalues["btn"]) : 0; int _pageGroup = queryvalues.ContainsKey("pageGroup") ? Convert.ToInt32(queryvalues["pageGroup"]) : 1; //Search ViewData["ClubList_PageList"] = ClubBLL.GetMyRebate(model); PagedList <UserClubDetail> obj = new PagedList <UserClubDetail>( new List <UserClubDetail>() , 1, 1, 1); ViewData["ClubListDetail"] = obj; if (btn == 1) { ViewData["hid"] = "1"; int tmp = model.SearchExter; model.SearchExter = Search; model.UserID = Search; ViewData["ClubListDetail"] = ClubBLL.GetMyRebateDetail(model); model.SearchExter = tmp; model.UserID = tmp; } return(View(model)); } }
public ActionResult ClubListDetail(Dictionary <string, string> queryvalues) { int _id = queryvalues.ContainsKey("UserID") ? string.IsNullOrWhiteSpace(queryvalues["UserID"]) ? 0 : Convert.ToInt32(queryvalues["UserID"]) : 0; int _page = queryvalues.ContainsKey("page") ? Convert.ToInt32(queryvalues["page"]) : 1; string _StartDate = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); string _ExpirationDate = queryvalues.ContainsKey("ExpirationDate") ? queryvalues["ExpirationDate"] : DateTime.Now.AddDays(1).ToString("yyyy-MM-dd 00:00:00"); GameRecordView model = new GameRecordView { UserID = _id, StartDate = _StartDate, ExpirationDate = _ExpirationDate, Page = _page }; model.DataList = ClubBLL.GetMyRebateDetail(model); if (Request.IsAjaxRequest()) { return(PartialView("ClubListDetail", model.DataList)); } return(View(model.DataList)); }