Ejemplo n.º 1
0
        public SplitPageResult <Style> QueryList(string clientType, string code, string displayName, string orderby, int pageSize, int pageIndex)
        {
            string mainDB = Common.DbSqlHelper.GetMainDBName();

            string where = "";
            if (!String.IsNullOrEmpty(clientType))
            {
                where += " and clienttype='" + clientType + "'";
            }
            if (!String.IsNullOrEmpty(code))
            {
                where += " and code like '%" + code + "%'";
            }
            if (!String.IsNullOrEmpty(displayName))
            {
                where += " and DipalsyName like '%" + displayName + "%'";
            }
            string sql = String.Format("select * from {0}.[dbo].Style where 1=1 {1}", mainDB, where);

            Hashtable pars = new Hashtable();
            //IList <PrivilegeUser>  r = this.QuerySql<PrivilegeUser>(sql, "*", "createtime desc,updatetime desc", pageSize, pageIndex, ref recordCount, pars);
            SplitPageResult <Style> re = this.QuerySplitPage <Style>(sql, "*", orderby, pageSize, pageIndex, pars);

            return(re);
        }
Ejemplo n.º 2
0
        public JsonResult GetPushDLLList(int pageSize, int pageIndex)
        {
            SplitPageResult <SMC_PushDll> users = BoFactory.GetSMC_PushDllBO.QueryPushDllList(pageSize, pageIndex);
            Hashtable result = new Hashtable();

            result["total"] = users.TotalCount;
            result["rows"]  = users.Items;
            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
0
        //public JsonFlexiGridData QueryPushNotificationList(PageView view)
        //{
        //    string tableName = "NotificationReport";
        //    string columns = "id,NotificationID,ReportCode,ReportMessage,AppCode,DeviceToken,Payload,NotificationIdentifier,ExpirationData,Priority";
        //    string orderby = "id desc";
        //    string where = "";
        //    string with = "";

        //    SmartBox.Console.Common.SelectPagnationEx r = base.SelectPaginationEx(tableName, columns, view.PageIndex + 1, view.PageSize, orderby, where, with);
        //    JsonFlexiGridData result = BaseDao<object>.ConvertJosnFlexGridData(r.Result.Tables[0], view, "id");
        //    result.page = r.PageCount;
        //    result.total = r.RecordCount;
        //    return result;
        //}

        public SplitPageResult <SMC_PushDll> QueryPushDLLList(int pageSize, int pageIndex)
        {
            string    mainDB = Common.DbSqlHelper.GetMainDBName();
            string    sql    = "select * from [dbo].SMC_PushDll where pd_status=1";
            Hashtable pars   = new Hashtable();
            //pars.Add("name", nam);
            //IList <PrivilegeUser>  r = this.QuerySql<PrivilegeUser>(sql, "*", "createtime desc,updatetime desc", pageSize, pageIndex, ref recordCount, pars);
            SplitPageResult <SMC_PushDll> re = this.QuerySplitPage <SMC_PushDll>(sql, "*", "pd_createdtime desc,pd_updatetime desc", pageSize, pageIndex, null);

            return(re);
        }
Ejemplo n.º 4
0
        public SplitPageResult <PrivilegeUser> QueryPrivilegeUser(string privilegeCode, int pageSize, int pageIndex)
        {
            string mainDB = Common.DbSqlHelper.GetMainDBName();
            string sql    = String.Format("select * from {0}.[dbo].privilegeuser where id=@pcode", mainDB);

            Hashtable pars = new Hashtable();

            pars.Add("pcode", privilegeCode);
            //IList <PrivilegeUser>  r = this.QuerySql<PrivilegeUser>(sql, "*", "createtime desc,updatetime desc", pageSize, pageIndex, ref recordCount, pars);
            SplitPageResult <PrivilegeUser> re = this.QuerySplitPage <PrivilegeUser>(sql, "*", "createtime desc,updatetime desc", pageSize, pageIndex, pars);

            return(re);
        }
Ejemplo n.º 5
0
        public SplitPageResult <StyleHomeItem> QueryStyleHomeItemList(string styleId, string orderby, int pageSize, int pageIndex)
        {
            string mainDB = Common.DbSqlHelper.GetMainDBName();

            string where = "";
            if (!String.IsNullOrEmpty(styleId))
            {
                where += " and styleId='" + styleId + "'";
            }
            string sql = String.Format("select * from {0}.[dbo].StyleHomeItem where 1=1 {1}", mainDB, where);

            Hashtable pars = new Hashtable();
            //IList <PrivilegeUser>  r = this.QuerySql<PrivilegeUser>(sql, "*", "createtime desc,updatetime desc", pageSize, pageIndex, ref recordCount, pars);
            SplitPageResult <StyleHomeItem> re = this.QuerySplitPage <StyleHomeItem>(sql, "*", orderby, pageSize, pageIndex, pars);

            return(re);
        }