Ejemplo n.º 1
0
        private void GetMagList()
        {
            string sql = "";
            int iStart = 0;
            try
            {
                iStart = int.Parse(HttpContext.Current.Request["pageIndex"].ToString()) * int.Parse(HttpContext.Current.Request["pageSize"].ToString());
            }
            catch { }
            int iLimit = 20;
            try
            {
                iLimit = int.Parse(HttpContext.Current.Request["pageSize"].ToString());
            }
            catch { }

            string RoleName = string.Empty;
            try
            {
                RoleName = HttpContext.Current.Request["RoleName"].ToString();
            }
            catch
            { }
            if (!string.IsNullOrEmpty(RoleName))
            {
                sql += "and RoleName like '%" + RoleName + "%' ";
            }
            string IsEnable = string.Empty;
            try
            {
                IsEnable = HttpContext.Current.Request["IsEnable"].ToString();
            }
            catch
            { }
            if (!string.IsNullOrEmpty(IsEnable))
            {
                sql += "and IsEnable = '" + IsEnable + "' ";
            }

            RoleFactory bll = new RoleFactory();
            HttpContext.Current.Response.Write(bll.GetMagList(sql, iStart, iLimit));
        }