Exemplo n.º 1
0
        public ActionResult Index()
        {
            Model.ManageUserModel uM = (Model.ManageUserModel)Session["logUser"];

            if (uM != null)
            {
                switch (uM.PowerSession)
                {
                case 0:
                case 4:
                case 6:
                case 7:
                    return(View());

                case 9:
                    return(RedirectToAction("UsrFeedback", "PlatformVisit"));

                default:
                    return(RedirectToAction("Servcie", "Home"));
                }
            }
            else
            {
                return(RedirectToAction("Login", "Account"));
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 订单列表控制器
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="Column"></param>
        /// <param name="strWhere"></param>
        /// <param name="orderStatus"></param>
        /// <param name="payType"></param>
        /// <param name="orderNo"></param>
        /// <param name="accId"></param>
        /// <param name="busName"></param>
        /// <param name="remark"></param>
        /// <param name="timePeriod"></param>
        /// <param name="start"></param>
        /// <param name="end"></param>
        /// <returns></returns>
        public ActionResult Index()
        {
            #region Former Codes
            //ViewBag.Page = pageIndex;

            //if (pageIndex != 1 && TempData["strWhere"] != null && TempData["page"] != null)
            //{
            //    strWhere = TempData["strWhere"].ToString();
            //    ViewBag.AllPage = Convert.ToInt32(TempData["page"]);
            //}
            //else
            //{
            //    if (start != "")
            //    {
            //        DateTime stTime = Convert.ToDateTime(start);
            //        strWhere += " createDate >='" + stTime.ToString("yyyy-MM-dd") + "' and";
            //    }
            //    if (end != "")
            //    {
            //        DateTime edTime = Convert.ToDateTime(end);
            //        strWhere += " createDate <'" + edTime.AddDays(1).Date.ToString("yyyy-MM-dd") + "' and";
            //    }


            //    if (orderStatus != -99)
            //    {
            //        strWhere += " orderStatus=" + orderStatus.ToString() + " and ";
            //    }
            //    if (payType != -99)
            //    {
            //        strWhere += " orderPayType=" + payType.ToString() + " and ";
            //    }
            //    if (orderNo != "")
            //    {
            //        strWhere += " orderNo=" + orderNo + " and ";
            //    }
            //    if (accId != "")
            //    {
            //        strWhere += " accId=" + accId + " and ";
            //    }
            //    if (busName != "")
            //    {
            //        strWhere += " dbo.GetOrderProjectName(busId) like '%" + busName + "%' and ";
            //    }
            //    if (remark != "")
            //    {
            //        strWhere += " remark like '%" + remark + "%' and ";
            //    }

            //    if (strWhere.Length > 0)
            //    {
            //        strWhere = strWhere.Substring(0, strWhere.LastIndexOf('a'));
            //    }

            //    int pageCount = OrderInfoList.GetPageCount(strWhere);
            //    ViewBag.AllPage = pageCount / pageSize + 1;

            //    TempData["strWhere"] = strWhere;
            //    TempData["page"] = ViewBag.AllPage;
            //}

            //List<OrderInfoModel> orderList = OrderInfoList.GetPage(pageIndex, pageSize, Column, strWhere);
            #endregion
            Model.ManageUserModel uM = (Model.ManageUserModel)Session["logUser"];

            if (uM != null)
            {
                if (uM.PowerSession == 0)
                {
                    ViewBag.AuthStatus = 1;
                }
                else
                {
                    ViewBag.AuthStatus = 0;
                }
            }
            else
            {
                ViewBag.AuthStatus = 0;
            }


            return(View());
        }