public ActionResult Index(OrderCash OrderCash, EFPagingInfo <OrderCash> p, bool?IsShowSupAgent, int IsFirst = 0, int TimeType = 1)
        {
            if (IsShowSupAgent == null)
            {
                IsShowSupAgent = false;
            }
            p = this.Condition(OrderCash, p, IsShowSupAgent, IsFirst, TimeType);
            p.OrderByList.Add("Id", "DESC");
            IPageOfItems <OrderCash> OrderCashList = null;

            if (IsFirst == 0)
            {
                OrderCashList = new PageOfItems <OrderCash>(new List <OrderCash>(), 0, 10, 0, new Hashtable());
            }
            else
            {
                OrderCashList = Entity.Selects <OrderCash>(p);
            }
            ViewBag.OrderCashList = OrderCashList;
            ViewBag.OrderCash     = OrderCash;
            IList <OrderCash> List = OrderCashList.GroupBy(n => n.UId).Select(n => n.First()).ToList();
            List <int>        UId  = new List <int>();

            foreach (var pp in List)
            {
                UId.Add(pp.UId);
            }
            ViewBag.UsersList      = Entity.Users.Where(n => n.State == 1 && UId.Contains(n.Id)).ToList();
            ViewBag.SysAgentList   = Entity.SysAgent.Where(n => n.State == 1).ToList();
            ViewBag.IsShowSupAgent = IsShowSupAgent;
            ViewBag.Save           = this.checkPower("Save");
            ViewBag.TimeType       = TimeType;
            ViewBag.ExcelExport    = this.checkPower("ExcelExport");
            return(View());
        }
        public ActionResult Index(OrderCash OrderCash, EFPagingInfo <OrderCash> p, bool?IsShowSupAgent, int IsFirst = 0)
        {
            if (IsShowSupAgent == null)
            {
                IsShowSupAgent = false;
            }
            p = this.Condition(OrderCash, p, IsShowSupAgent);
            if (Request.QueryString["PageSize"].IsNullOrEmpty())
            {
                p.PageSize = 30;
            }
            p.OrderByList.Add("Id", "DESC");
            IPageOfItems <OrderCash> OrderCashList = null;

            if (IsFirst == 0)
            {
                OrderCashList = new PageOfItems <OrderCash>(new List <OrderCash>(), 0, 10, 0, new Hashtable());
            }
            else
            {
                OrderCashList = Entity.Selects <OrderCash>(p);
            }
            ViewBag.OrderCashList = OrderCashList;
            ViewBag.OrderCash     = OrderCash;
            IList <OrderCash> List = OrderCashList.GroupBy(n => n.UId).Select(n => n.First()).ToList();
            List <int>        UId  = new List <int>();

            foreach (var pp in List)
            {
                UId.Add(pp.UId);
            }
            ViewBag.UsersList      = Entity.Users.Where(n => n.State == 1 && UId.Contains(n.Id)).ToList();
            ViewBag.SysAgentList   = Entity.SysAgent.Where(n => n.State == 1).ToList();
            ViewBag.IsShowSupAgent = IsShowSupAgent;//是否显示下级

            bool PayCash = checkPower("PayCash");

            ViewBag.PayCash     = PayCash;
            ViewBag.Edit        = this.checkPower("Edit");
            ViewBag.Cancel      = this.checkPower("Cancel");
            ViewBag.Save        = this.checkPower("Save");
            ViewBag.Xls         = this.checkPower("Xls");
            ViewBag.XLSDoShanFu = this.checkPower("XLSDoShanFu");
            return(View());
        }