public ActionResult AddWishJosn(Wish wish) { wish.UserID = User.Identity.Name.Uint(); var result = new WishHelper().AddWish(wish); return(Json(result)); }
public ActionResult Wish(int id) { var wish = new WishHelper().GetWishByID(id); var wishList = new WishHelper().GetSiteWishList().ToList(); ViewBag.New = wishList.OrderByDescending(m => m.DateStart).Take(5).ToList(); ViewBag.AlreadyApply = wishList.Where(m => m.Status == "进行中"); ViewBag.Wish = "current"; return(View(wish)); }
public ActionResult Weaker(int id) { var user = new UserHelper().GetUserEntity(id); var wishList = new WishHelper().GetSiteWishList().ToList(); ViewBag.New = wishList.OrderByDescending(m => m.DateStart).Take(5).ToList(); ViewBag.AlreadyApply = wishList.Where(m => m.Status == "进行中"); ViewBag.Publish = wishList.Where(m => m.UserID == id); ViewBag.Apply = wishList.Where(m => m.ApplyUserID == id); ViewBag.Weaker = "current"; return(View(user)); }
public ActionResult AlreadyApplyWishJson() { int tCount = 0; GetReportDataParams param = new GetReportDataParams(); List <KeyValue> where = new Functions().GetParam(Request); param.PageIndex = string.IsNullOrEmpty(Request["page"]) ? 1 : Convert.ToInt32(Request["page"]); param.PageSize = string.IsNullOrEmpty(Request["rows"]) ? 20 : Convert.ToInt32(Request["rows"]); param.Order = Request["sort"] == null ? "" : Request["sort"] + " " + Request["order"]; param.Where = where; var list = new WishHelper().GetWishReport(param, out tCount); var json = new DataGridJson(tCount, list); return(Json(json)); }
//心愿 public ActionResult WishList(int?status, string title, int?page) { var result = new WishHelper().GetWishList(status, title); var model = new SitePaginated <Wish>(result, page ?? 1, 9); switch (status) { case 1: ViewBag.B = "current"; break; case 2: ViewBag.C = "current"; break; case 3: ViewBag.D = "current"; break; default: ViewBag.A = "current"; break; } ViewBag.Wish = "current"; return(View(model)); }
public ActionResult WishListJson() { int tCount = 0; GetReportDataParams param = new GetReportDataParams(); List <KeyValue> where = new Functions().GetParam(Request); //where.Add(new KeyValue { Key = "Status1", Value = WishStatus.WaitAudit.ToString() }); where.Add(new KeyValue { Key = "UserID", Value = User.Identity.Name }); param.PageIndex = string.IsNullOrEmpty(Request["page"]) ? 1 : Convert.ToInt32(Request["page"]); param.PageSize = string.IsNullOrEmpty(Request["rows"]) ? 20 : Convert.ToInt32(Request["rows"]); param.Order = Request["sort"] == null ? "" : Request["sort"] + " " + Request["order"]; param.Where = where; var list = new WishHelper().GetWishReport(param, out tCount); var json = new DataGridJson(tCount, list); return(Json(json)); }
public ActionResult ApplyWish(int id) { var result = new WishHelper().ApplyWish(id, User.Identity.Name.Uint()); return(Json(result)); }
public ActionResult Quit(int id) { var result = new WishHelper().QuitWish(id); return(Json(result)); }
public ActionResult DeleteWishJson(int id) { var result = new WishHelper().DeleteWish(id); return(Json(result)); }
public ActionResult EditWishJson(Wish wish) { var result = new WishHelper().UpdateWish(wish); return(Json(result)); }
public ActionResult EditWishView(int id) { var wish = new WishHelper().GetWishByID(id); return(View(wish)); }
public ActionResult MakeDone(int id) { var result = new WishHelper().MakeDone(id); return(Json(result)); }
public ActionResult AuditWishJson(string ids) { var result = new WishHelper().AuditWish(ids); return(Json(result)); }
public ActionResult TransferWishJson(int id, int userID) { var result = new WishHelper().TransferWish(id, userID); return(Json(result)); }