Ejemplo n.º 1
0
        public ActionResult RouletteShopGet(Dictionary <string, string> queryvalues)
        {
            int _id = queryvalues.ContainsKey("ID") ? string.IsNullOrWhiteSpace(queryvalues["ID"]) ? 0 : Convert.ToInt32(queryvalues["ID"]) : 0;

            int res = BaseDataBLL.GetRouletteShop(_id);

            if (res > 0)
            {
                return(Json(new { result = 0 }));
            }
            return(Json(new { result = 1 }));
        }
Ejemplo n.º 2
0
        public ActionResult RouletteShop(Dictionary <string, string> queryvalues)
        {
            int    _id             = queryvalues.ContainsKey("ID") ? Convert.ToInt32(queryvalues["ID"]) : 0;
            int    _userID         = queryvalues.ContainsKey("UserID") ? Convert.ToInt32(queryvalues["UserID"]) : 0;
            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.ToString("yyyy-MM-dd 00:00:00");
            int    _page           = queryvalues.ContainsKey("page") ? Convert.ToInt32(queryvalues["page"]) : 1;
            int    _pageGroup      = queryvalues.ContainsKey("pageGroup") ? Convert.ToInt32(queryvalues["pageGroup"]) : 1;

            BaseDataView vbd = new BaseDataView {
                StartDate = _StartDate, ExpirationDate = _ExpirationDate, UserID = _userID, Page = _page
            };
            PagedList <Roulette> pa = new PagedList <Roulette>(BaseDataBLL.GetRouletteShop(vbd), _pageGroup, 10);

            vbd.BaseDataList      = pa;
            ViewData["dataGroup"] = vbd.BaseDataList;

            return(View(vbd));
        }