/// <summary> /// 根据单位类型和上级模块,查询可管理模块。 /// </summary> public void MENU() { ActiveResult vret = new ActiveResult(); String cTYPE_ID = StringEx.getString(request["TYPE_ID"]); String cORG_CLS = StringEx.getString(request["ORG_CLS"]); if (cTYPE_ID.Length == 0) { vret = ActiveResult.Valid("单位序号不能为空!"); } else if (cORG_CLS.Length == 0) { vret = ActiveResult.Valid("单位类型不能为空!"); } else { StringBuilder sql = new StringBuilder(); sql.Append(" SELECT ITEM_ID,ITEM_NAME,EVENT,PARENTID,ALLOW_ORGS "); sql.Append(" FROM S_NODES "); sql.Append(" WHERE PARENTID='" + cTYPE_ID + "' and ALLOW_ORGS LIKE '" + "%" + cORG_CLS + "%" + "'"); DataTable dtRows = DbManager.QueryData(sql.ToString()); vret = ActiveResult.Query(dtRows); } response.Write(vret.toJSONString()); }
public void find() { ActiveResult vret = new ActiveResult(); String cDBKey = StringEx.getString(request["ID"]); DataTable dtRows = DbManager.QueryData("select * from XT_IMG_SCREEN where id='" + cDBKey + "'"); String cCUTOUT_TXT = StringEx.getString(dtRows, 0, "CUTOUT_TXT"); int i = cCUTOUT_TXT.IndexOf(","); dtRows.Columns.Add("CHINESE"); StringBuilder cChinese = new StringBuilder(); if (i > 0) { string[] sArray = cCUTOUT_TXT.Split(','); foreach (string cEN in sArray) { String cCH = DbManager.GetStrValue("select CHINESE from XT_IMG_DICT where ENGLISH like '%" + cEN + "%'"); if (String.IsNullOrEmpty(cCH)) { cChinese.Append(cEN + ","); } else { cChinese.Append(cCH + ","); } } } dtRows.Rows[0]["CHINESE"] = cChinese.ToString(); vret = ActiveResult.Query(dtRows); response.Write(vret.toJSONString()); }
public void query() { String cORG_ID = Config.GetAppSettings("ORG_ID"); ActiveResult vret = ActiveResult.Valid(AppConfig.FAILURE); String cWhereParm = " (ORG_ID ='" + cORG_ID + "') "; String cSTART_DAY = StringEx.getString(request["START_DAY"]); String cFINISH_DAY = StringEx.getString(request["FINISH_DAY"]); if (!String.IsNullOrEmpty(cSTART_DAY)) { cWhereParm = cWhereParm + " AND TIME>='" + cSTART_DAY + "'"; } if (!String.IsNullOrEmpty(cFINISH_DAY)) { cWhereParm = cWhereParm + " AND TIME<='" + cFINISH_DAY + "'"; } String cOrderBy = "ORDER BY ID ASC"; DBResult dbret = dao.QueryResult(cWhereParm, cOrderBy, iPageNo, iPageSize); DataTable dtRows = dbret.dtrows; int iRowsCount = dbret.ROW_COUNT; vret = ActiveResult.Query(dtRows); vret.total = iRowsCount; response.Write(vret.toJSONString()); }
public void city_gxsd() { ActiveResult vret = new ActiveResult(); String cXZQDM = StringEx.getString(request["XZQDM"]); String cORG_ID = StringEx.getString(request["ORG_ID"]); if (String.IsNullOrEmpty(cORG_ID)) { vret = ActiveResult.Query(null); response.Write(vret.toJSONString()); return; } cORG_ID = cORG_ID.Replace("00", ""); StringBuilder sql = new StringBuilder(); if (cORG_ID.Length == 4) { sql.Append(" (XZQDM LIKE '" + cORG_ID + "%') "); } if (cXZQDM.Length > 0) { sql.Append(" AND (XZQDM='" + cXZQDM + "') "); } DBResult dbret = dao.Query("JCTB_GUID,XZQDM,XMC AS XZQMC,JCBH,AREA_XZQDM AS GXQDM,(SELECT GXQ_NAME FROM S_GXQ_INF X WHERE X.GXQ_ID=AREA_XZQDM) AS GXQMC ", sql.ToString(), " order by xzqdm,jcbh asc ", iPageNo, iPageSize); vret = ActiveResult.Query(dbret.dtrows); int iRowCount = (dbret == null) ? 0 : dbret.ROW_COUNT; vret.total = iRowCount; response.Write(vret.toJSONString()); }
public void report() { ActiveResult vret = ActiveResult.Valid(AppConfig.FAILURE); String cORG_ID = StringEx.getString(request["ORG_ID"]); if (String.IsNullOrEmpty(cORG_ID)) { vret = ActiveResult.Valid("用户账号不能为空!"); } else { String cAreaID = AppManager.getAreaHeader(cORG_ID); StringBuilder sql = new StringBuilder(); sql.Append(" SELECT ORG_ID "); sql.Append(" , (SELECT ORG_NAME FROM S_ORG_INF X WHERE X.ORG_ID = T.ORG_ID) AS ORG_NAME "); sql.Append(" , COUNT(1) AS ALL_TASK "); sql.Append(" , (SELECT COUNT(1) FROM XT_TASK_LIST X WHERE X.ORG_ID = T.ORG_ID) AS LEFT_TASK "); sql.Append(" FROM XT_CAMERA T "); sql.Append(" WHERE ORG_ID like '" + cAreaID + "%'"); sql.Append(" GROUP BY ORG_ID "); DataTable dtRows = DbManager.QueryData(sql.ToString()); vret = ActiveResult.Query(dtRows); } response.Write(vret.toJSONString()); }
public void query() { ActiveResult vret = new ActiveResult(); DBResult dbret = dao.Query(null, "ORDER BY NOTICE_ID DESC", iPageNo, iPageSize); vret = ActiveResult.Query(dbret.dtrows); vret.total = dbret.ROW_COUNT; response.Write(vret.toJSONString()); }
public void query() { ActiveResult vret = new ActiveResult(); String sql = StringEx.getString(request["SQLTEXT"]); DataTable dtRows = dao.query(sql); vret = ActiveResult.Query(dtRows); response.Write(vret.toJSONString()); }
public void query() { ActiveResult vret = new ActiveResult(); String cORG_ID = StringEx.getString(request["ORG_ID"]); String cWhereParm = "ORG_ID='" + cORG_ID + "'"; DataTable dtRows = dao.QueryData(cWhereParm); vret = ActiveResult.Query(dtRows); response.Write(vret.toJSONString()); }
public void list() { ActiveResult vret = new ActiveResult(); String cGXQ_ID = StringEx.getString(request["GXQ_COUNTY_ID"]); String cXZQ_ID = StringEx.getString(request["XZQ_COUNTY_ID"]); if ((String.IsNullOrEmpty(cGXQ_ID)) && (String.IsNullOrEmpty(cXZQ_ID))) { vret = ActiveResult.Query(null); response.Write(vret.toJSONString()); } else { String cORDER_BY = StringEx.getString(request["ORDERBY"]); String cJCBH = StringEx.getString(request["JCBH"]); String cTAG = StringEx.getString(request["TAG"]); StringBuilder sql = new StringBuilder(); sql.Append(" SELECT JCTB_GUID,XZQDM,XZQMC,JCBH "); if (cGXQ_ID.Length > 0) { sql.Append(" WHERE (AREA_XZQDM='" + cGXQ_ID + "') "); } if (cXZQ_ID.Length > 0) { sql.Append(" WHERE (XZQDM='" + cXZQ_ID + "') "); } if (cTAG.Equals("2")) { sql.Append(" AND (DX_LX=2) "); } if (cJCBH.Length > 0) { sql.Append(" AND JCBH='" + cJCBH + "' "); } if (cORDER_BY.Length > 0) { sql.Append(" ORDER BY " + cORDER_BY); } else { sql.Append(" ORDER BY JCBH "); } DataTable dtRows = DbManager.QueryData(sql.ToString()); vret = ActiveResult.Query(dtRows); response.Write(vret.toJSONString()); } }
public void find() { ActiveResult vret = ActiveResult.Valid(AppConfig.FAILURE); String cKeyID = StringEx.getString(request["ID"]); String cCAMERA_ID = StringEx.getString(request["REC_ID"]); DataTable dtInfo = DbManager.QueryData(" select * from xt_CAMERA where ID = '" + cCAMERA_ID + "'"); vret = ActiveResult.Query(dtInfo); response.Write(vret.toJSONString()); }
public void query() { String cORG_ID = StringEx.getString(request["ORG_ID"]); InitOrgConfig(cORG_ID); ActiveResult vret = ActiveResult.Valid(AppConfig.FAILURE); DataTable dtRows = DbManager.QueryData("SELECT A.*,B.DEFVAL,KEYDESC,TYPE_ID FROM S_ORG_INF_CONFIG A,S_CONSTANT B WHERE A.KEYNAME=B.KEYNAME AND A.ORG_ID='" + cORG_ID + "'"); vret = ActiveResult.Query(dtRows); response.Write(vret.toJSONString()); }
public void village_list() { String cORG_ID = StringEx.getString(request["ORG_ID"]); String cAreaID = cORG_ID.Replace("00", ""); ActiveResult vret = ActiveResult.Valid(AppConfig.FAILURE); String cWhereParm = " (ORG_ID like '" + cAreaID + "%') "; String cOrderBy = "ORDER BY ORG_ID ASC"; DataTable dtRows = dao.QueryData("distinct VILLAGE AS ORG_ID,VILLAGE AS ORG_NAME", cWhereParm, cOrderBy); vret = ActiveResult.Query(dtRows); response.Write(vret.toJSONString()); }
public void find() { ActiveResult vret = ActiveResult.Valid(AppConfig.FAILURE); String cKeyID = StringEx.getString(request["ID"]); String cCAMERA_ID = StringEx.getString(request["REC_ID"]); String cCamera_ID = DbManager.GetStrValue(" select CAMERA_ID from XT_IMG_REC where REC_ID = '" + cCAMERA_ID + "'"); DataTable dtInfo = DbManager.QueryData(" SELECT * FROM XT_CAMERA WHERE DEVICE_ID = '" + cCamera_ID + "' "); vret = ActiveResult.Query(dtInfo); response.Write(vret.toJSONString()); }
public void query() { ActiveResult vret = new ActiveResult(); String cWhereParm = " "; String cOrderBy = " order by id asc"; DBResult dbret = DbManager.Query("*", "XT_IMG_SCREEN", cWhereParm, cOrderBy, iPageNo, iPageSize); DataTable dtRows = dbret.dtrows; vret = ActiveResult.Query(dtRows); vret.total = dbret.ROW_COUNT; response.Write(vret.toJSONString()); }
public void fetch() { String cOrgID = StringEx.getString(request["ORG_ID"]); ActiveResult vret = new ActiveResult(); String cWhereParm = " (ORG_ID='" + cOrgID + "') AND (JBTYPE='WEB') "; String cOrderBy = " order by ID"; DBResult dbret = webDao.Quertys(cWhereParm, cOrderBy, iPageNo, iPageSize); DataTable dtRows = dbret.dtrows; int iRowCount = (dtRows == null) ? 0 : dtRows.Rows.Count; vret = ActiveResult.Query(dtRows); vret.total = iRowCount; response.Write(vret.toJSONString()); }
public void query() { ActiveResult vret = new ActiveResult(); String cCLS_ID = StringEx.getString(request["cls_id"]); String cWhereParm = " CLS_ID='" + cCLS_ID + "'"; String cOrderBy = " order by TYPE_ID asc"; DBResult dbret = dao.Query(cWhereParm, cOrderBy, iPageNo, iPageSize); DataTable dtRows = dbret.dtrows; int iRowCount = (dtRows == null) ? 0 : dtRows.Rows.Count; vret = ActiveResult.Query(dtRows); vret.total = iRowCount; response.Write(vret.toJSONString()); }
public void query() { String cKeyGuid = StringEx.getString(request["ID"]); ActiveResult vret = ActiveResult.Valid(AppConfig.FAILURE); String cWhereParm = " (JB_ID ='" + cKeyGuid + "') "; String cOrderBy = "ORDER BY ID ASC"; DataTable dtRows = dao.Query(cWhereParm, cOrderBy); int iRowsCount = dtRows.Rows.Count; vret = ActiveResult.Query(dtRows); vret.total = iRowsCount; response.Write(vret.toJSONString()); }
/// <summary> /// /// </summary> public void export_query() { String cORG_ID = Config.GetAppSettings("ORG_ID"); ActiveResult vret = ActiveResult.Valid(AppConfig.FAILURE); String cWhereParm = " (ORG_ID ='" + cORG_ID + "') AND (SD_RESULT=1) "; String cOrderBy = "ORDER BY ID ASC"; DBResult dbret = dao.QueryResult(cWhereParm, cOrderBy, iPageNo, iPageSize); DataTable dtRows = dbret.dtrows; int iRowsCount = dbret.ROW_COUNT; vret = ActiveResult.Query(dtRows); vret.total = iRowsCount; response.Write(vret.toJSONString()); }
public void query() { String cORG_ID = StringEx.getString(request["ORG_ID"]); ActiveResult vret = ActiveResult.Valid(AppConfig.FAILURE); String cWhereParm = " (ORG_ID ='" + cORG_ID + "') AND (JBTYPE='WEIXIN') "; String cOrderBy = "ORDER BY ID ASC"; DBResult dbret = dao.Query(cWhereParm, cOrderBy, iPageNo, iPageSize); DataTable dtRows = dbret.dtrows; int iRowsCount = dbret.ROW_COUNT; vret = ActiveResult.Query(dtRows); vret.total = iRowsCount; response.Write(vret.toJSONString()); }
public void query() { ActiveResult vret = new ActiveResult(); String cORG_ID = StringEx.getString(request["ORG_ID"]); String cWhereParm = ""; String cOrderBy = "ORDER BY ID ASC"; DBResult dbret = dao.Query(cWhereParm, cOrderBy, iPageNo, iPageSize); DataTable dtRows = dbret.dtrows; int iRowsCount = dbret.ROW_COUNT; vret = ActiveResult.Query(dtRows); vret.total = iRowsCount; response.Write(vret.toJSONString()); }
public void query() { ActiveResult vret = new ActiveResult(); String cMaxID = StringEx.getString(request["MAXID"]); String cORG_ID = StringEx.getString(request["ORG_ID"]); String cCOUNTY = StringEx.getString(request["COUNTY"]); String C_VILLAGE = StringEx.getString(request["VILLAGE"]); String cADDR = StringEx.getString(request["ADDR"]); String C_PAGE_SIZE = StringEx.getString(request["PAGE_SIZE"]); int iPage_Size = StringEx.getInt(C_PAGE_SIZE); DBResult rs = dao.search(cORG_ID, cMaxID, cCOUNTY, cADDR, C_VILLAGE, iPage_Size); vret = ActiveResult.Query(rs.dtrows); vret.total = rs.ROW_COUNT; response.Write(vret.toJSONString()); }
public void query() { String cORG_ID = StringEx.getString(request["ORG_ID"]); int iOrgType = AppManager.getAreaType(cORG_ID); ActiveResult vret = ActiveResult.Valid(AppConfig.FAILURE); String cWhereParm = "ORG_TYPE= '" + iOrgType + "'"; String cOrderBy = "ORDER BY ROLE_ID ASC"; DBResult dbret = dao.Query(cWhereParm, cOrderBy, iPageNo, iPageSize); DataTable dtRows = dbret.dtrows; int iRowsCount = dbret.ROW_COUNT; vret = ActiveResult.Query(dtRows); vret.total = iRowsCount; response.Write(vret.toJSONString()); }
public void query_alarm() { String cORG_ID = StringEx.getString(request["ORG_ID"]); String cCAMERA_NAME = StringEx.getString(request["CAMERA_NAME"]); String cALARM_CHECKED = StringEx.getString(request["ALARM_CHECKED"]); String cALARM_FLAG = StringEx.getString(request["ALARM_FLAG"]); ActiveResult vret = ActiveResult.Valid(AppConfig.FAILURE); String cWhereParm = " EXISTS( SELECT 1 FROM XT_CAMERA X WHERE X.ORG_ID='" + cORG_ID + "' AND X.DEVICE_ID=CAMERA_ID AND ALARM_FLAG = '0' AND ALARM_CHECKED = '0' "; if (!String.IsNullOrWhiteSpace(cCAMERA_NAME)) { cWhereParm = cWhereParm + " AND (CAMERA_NAME LIKE '%" + cCAMERA_NAME + "%')"; } cWhereParm = cWhereParm + " )"; if (!String.IsNullOrWhiteSpace(cALARM_FLAG)) { cWhereParm = cWhereParm + " AND (ALARM_FLAG=" + cALARM_FLAG + ") "; } if (!String.IsNullOrWhiteSpace(cALARM_CHECKED)) { if (cALARM_CHECKED.Equals("0")) { cWhereParm = cWhereParm + " AND ALARM_CHECKED='" + cALARM_CHECKED + "'"; } else { cWhereParm = cWhereParm + " AND ALARM_CHECKED> 0 "; } } String cOrderBy = "ORDER BY REC_ID ASC"; DBResult dbret = dao.Query("*" + ",(SELECT CAMERA_NAME FROM XT_CAMERA X WHERE X.DEVICE_ID=CAMERA_ID) AS CAMERA_NAME" + ",(SELECT ADDR FROM XT_CAMERA X WHERE X.DEVICE_ID=CAMERA_ID) AS ADDR ", "XT_IMG_REC T", cWhereParm, cOrderBy, iPageNo, iPageSize); DataTable dtRows = dbret.dtrows; int iRowsCount = dbret.ROW_COUNT; vret = ActiveResult.Query(dtRows); vret.total = iRowsCount; response.Write(vret.toJSONString()); }
public void query() { String cORG_ID = StringEx.getString(request["ORG_ID"]); ActiveResult vret = new ActiveResult(); if (cORG_ID.Length == 0) { vret = ActiveResult.Valid("错误,参数ORG_ID未正常传递!"); } else { String cWhereParm = "ORG_ID like '" + cORG_ID + "%'"; String cOrderBy = " order by ORG_ID desc "; DBResult dbret = dao.Query(cWhereParm, cOrderBy, iPageNo, iPageSize); DataTable dtRows = dbret.dtrows; vret = ActiveResult.Query(dtRows); vret.total = dtRows.Rows.Count; } response.Write(vret.toJSONString()); }
public void query_list() { String cREC_ID = StringEx.getString(request["REC_ID"]); ActiveResult vret = ActiveResult.Valid(AppConfig.FAILURE); DataTable dtInfo = DbManager.QueryData("SELECT CAMERA_ID,PRESET_ID FROM XT_IMG_REC WHERE REC_ID='" + cREC_ID + "'"); String cCAMERA_ID = StringEx.getString(dtInfo, 0, "CAMERA_ID"); String cPRESET_ID = StringEx.getString(dtInfo, 0, "PRESET_ID"); String cWhereParm = " CAMERA_ID='" + cCAMERA_ID + "' AND PRESET_ID='" + cPRESET_ID + "'"; String cOrderBy = "ORDER BY REC_ID ASC"; DBResult dbret = dao.Query("*,(SELECT ADDR FROM XT_CAMERA X WHERE X.DEVICE_ID=CAMERA_ID) AS ADDR ", "XT_IMG_REC T", cWhereParm, cOrderBy, iPageNo, iPageSize); DataTable dtRows = dbret.dtrows; int iRowsCount = dbret.ROW_COUNT; vret = ActiveResult.Query(dtRows); vret.total = iRowsCount; response.Write(vret.toJSONString()); }