예제 #1
0
        public Dictionary <string, object> GetTaskInfo(string RWBH, string RWMC, int page, int limit)
        {
            Dictionary <string, object> r = new Dictionary <string, object>();

            try
            {
                DataTable dt = db.GetTaskInfo(RWBH, RWMC);
                if (dt.Rows.Count > 0)
                {
                    r["message"] = "成功";
                    r["code"]    = 2000;
                    r["items"]   = KVTool.GetPagedTable(dt, page, limit);
                    r["total"]   = dt.Rows.Count;
                }
                else
                {
                    r["message"] = "成功,但是没有数据";
                    r["code"]    = 2000;
                    r["total"]   = 0;
                }
            }
            catch (Exception e)
            {
                r["code"]    = -1;
                r["message"] = e.Message;
            }
            return(r);
        }