Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        public void DeviceList( )
        {
            int pageindex   = this.GetFormValue("page", 1);//
            int pageSize    = this.GetFormValue("pagesize", 20);
            int recordCount = 0;

            DeviceWhere where = new DeviceWhere();
            where.brand       = this.GetFormValue("brand", "");
            where.deviceno    = this.GetFormValue("deviceno", "");
            where.deviename   = this.GetFormValue("devicename", "");
            where.osversion   = this.GetFormValue("osversion", "");


            List <DeviceModel> result = DeviceService.Instance.DeviceList(pageindex, pageSize, out recordCount, where);
            int pageCount             = recordCount / pageSize;

            if (recordCount % pageSize != 0)
            {
                ++pageCount;
            }
            this.Data["PageSize"]  = pageSize;
            this.Data["PageIndex"] = pageindex;
            this.Data["Total"]     = recordCount;
            this.Data["PageCount"] = pageCount;
            this.Data["Rows"]      = result;
        }
Beispiel #2
0
 public List <DeviceModel> DeviceList(int pageIndex, int pageSize, out int recordCount, DeviceWhere where)
 {
     return(dal.GetDeviceList(pageIndex, pageSize, out recordCount, where));
 }