示例#1
0
        private void loadData(string table)
        {
            string strWhere = string.Empty;

            if (!string.IsNullOrEmpty(Request["CODE_S"]))
            {
                strWhere = strWhere + " and t1.Code like '%" + Request["CODE_S"] + "%'";
            }
            if (!string.IsNullOrEmpty(Request["CNNAME_S"]))
            {
                strWhere = strWhere + " and t1.name like '%" + Request["CNNAME_S"] + "%'";
            }
            if (!string.IsNullOrEmpty(Request["ENABLED_S"]))
            {
                strWhere = strWhere + " and t1.enabled='" + Request["ENABLED_S"] + "'";
            }
            switch (table)
            {
            case "base_insplicense":
            case "base_inspinvoice":
            case "base_booksdata":
            case "sys_declarationcar":
                strWhere = string.Empty;
                strWhere = GetSearch(table);
                break;
            }
            Sql.Base_blend_web bw = new Sql.Base_blend_web();
            DataTable          dt = bw.LoaData(table, strWhere, "", "", ref totalProperty, Convert.ToInt32(Request["start"]),
                                               Convert.ToInt32(Request["limit"]));
            string json = JsonConvert.SerializeObject(dt, iso);

            Response.Write("{rows:" + json + ",total:" + totalProperty + "}");
            Response.End();
        }
示例#2
0
        public void loaddatacategory()
        {
            string strWhere = string.Empty;

            if (!string.IsNullOrEmpty(Request["CODE_S_category"]))
            {
                strWhere = strWhere + " and t1.code like '%" + Request["CODE_S_category"] + "%'";
            }
            if (!string.IsNullOrEmpty(Request["CNNAME_S_category"]))
            {
                strWhere = strWhere + " and t1.name like '%" + Request["CNNAME_S_category"] + "%'";
            }
            string table = "category";

            Sql.Base_blend_web bw = new Sql.Base_blend_web();
            DataTable          dt = bw.LoaData(table, strWhere, "", "", ref totalProperty, Convert.ToInt32(Request["start"]),
                                               Convert.ToInt32(Request["limit"]));
            string json = JsonConvert.SerializeObject(dt, iso);

            Response.Write("{rows:" + json + ",total:" + totalProperty + "}");
            Response.End();
        }