示例#1
0
        private void GetMagList()
        {
            string sql = "and IsDeleted=0 ";
            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 SupName = string.Empty;
            try
            {
                SupName = HttpContext.Current.Request["SupName"].ToString();
            }
            catch
            { }
            if (!string.IsNullOrEmpty(SupName))
            {
                sql += "and (SupName like '%" + SupName + "%' or SupCode like '%" + SupName + "%') ";
            }
            string SupProd = string.Empty;
            try
            {
                SupProd = HttpContext.Current.Request["SupProd"].ToString();
            }
            catch
            { }
            if (!string.IsNullOrEmpty(SupProd))
            {
                sql += "and SupProd like '%" + SupProd + "%' ";
            }

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