Exemplo n.º 1
0
        public string GetSanitationList(int pageNumber, int pageSize, string _searchtext, string _searchtype, int _supplierId)
        {
            DataTable dt    = new DataTable();
            int       total = 0;

            try
            {
                if (_supplierId > 0 && !string.IsNullOrEmpty(_searchtype))
                {
                    string where = " type1='供应商管理' and type2 = '" + _searchtype + "' and tId = " + _supplierId;
                    if (!string.IsNullOrEmpty(_searchtext))
                    {
                        var strs = _searchtext.Split(',');
                        where += string.Format(" and createDate BETWEEN '{0}' and '{1}'", strs[0], strs[1]);
                    }
                    dt    = _attachmentbll.GetListByPage(where, "updateDate", pageNumber * 8 - 7, pageNumber * 8).Tables[0];
                    total = dt.Rows.Count;
                    total = _attachmentbll.GetModelList(where).Count;
                }
            }
            catch { }
            return(PublicClass.ToJson(dt, total));
        }