示例#1
0
        private void loadData()
        {
            string strWhere = " where t1.enabled=1 and t2.enabled=1 ";

            if (!string.IsNullOrEmpty(Request["CODE_HS"]))
            {
                strWhere = strWhere + " and t1.hscode like '%" + Request["CODE_HS"] + "%'";
            }
            if (!string.IsNullOrEmpty(Request["NAME_HS"]))
            {
                strWhere = strWhere + " and t2.hsname like '%" + Request["NAME_HS"] + "%'";
            }
            if (!string.IsNullOrEmpty(Request["CODE_CIQ"]))
            {
                strWhere = strWhere + " and t1.ciqcode like '%" + Request["CODE_CIQ"] + "%'";
            }
            if (!string.IsNullOrEmpty(Request["NAME_CIQ"]))
            {
                strWhere = strWhere + " and t3.ciqname like '%" + Request["NAME_CIQ"] + "%'";
            }
            if (!string.IsNullOrEmpty(Request["ENABLED_S"]))
            {
                strWhere = strWhere + " and t1.enabled='" + Request["ENABLED_S"] + "'";
            }
            Sql.RelaHSCCIQ bc = new Sql.RelaHSCCIQ();
            DataTable      dt = bc.LoaData(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();
        }