Esempio n. 1
0
        public ActionResult AddWishJosn(Wish wish)
        {
            wish.UserID = User.Identity.Name.Uint();

            var result = new WishHelper().AddWish(wish);

            return(Json(result));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        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));
        }
Esempio n. 4
0
        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));
        }
Esempio n. 5
0
        //心愿
        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));
        }
Esempio n. 6
0
        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));
        }
Esempio n. 7
0
        public ActionResult ApplyWish(int id)
        {
            var result = new WishHelper().ApplyWish(id, User.Identity.Name.Uint());

            return(Json(result));
        }
Esempio n. 8
0
        public ActionResult Quit(int id)
        {
            var result = new WishHelper().QuitWish(id);

            return(Json(result));
        }
Esempio n. 9
0
        public ActionResult DeleteWishJson(int id)
        {
            var result = new WishHelper().DeleteWish(id);

            return(Json(result));
        }
Esempio n. 10
0
        public ActionResult EditWishJson(Wish wish)
        {
            var result = new WishHelper().UpdateWish(wish);

            return(Json(result));
        }
Esempio n. 11
0
        public ActionResult EditWishView(int id)
        {
            var wish = new WishHelper().GetWishByID(id);

            return(View(wish));
        }
Esempio n. 12
0
        public ActionResult MakeDone(int id)
        {
            var result = new WishHelper().MakeDone(id);

            return(Json(result));
        }
Esempio n. 13
0
        public ActionResult AuditWishJson(string ids)
        {
            var result = new WishHelper().AuditWish(ids);

            return(Json(result));
        }
Esempio n. 14
0
        public ActionResult TransferWishJson(int id, int userID)
        {
            var result = new WishHelper().TransferWish(id, userID);

            return(Json(result));
        }