Esempio n. 1
0
        public override void Ashx_Load()
        {
            string actionType = "";
            string type       = "";
            string text       = "";

            CheckRequery.checkNotNull("actionType", "类型不能为空!", out actionType);
            string strSql = "";

            switch (actionType)
            {
            case "POI":
                CheckRequery.check("text", out text);
                strSql = string.Format("SELECT 经度,纬度,geom,st_asgeojson(geom) geometry from leakage.poi where 名称='{0}'", text);
                DataSet ContentList = APP.PGSQL_Helper.Query(strSql);
                Context.Response.Write(EasyUI_Pagination.ExportSuccess(ContentList.Tables[0], ContentList.Tables[0].Rows.Count));
                break;

            case "Road":
                CheckRequery.check("text", out text);
                strSql      = string.Format("SELECT 道路名称,geom,st_asgeojson(geom) geometry from leakage.dlzxx where 道路名称='{0}'", text);
                ContentList = APP.PGSQL_Helper.Query(strSql);
                Context.Response.Write(EasyUI_Pagination.ExportSuccess(ContentList.Tables[0], ContentList.Tables[0].Rows.Count));
                break;
            }
        }
Esempio n. 2
0
        protected void getHiddenById(string hdId)
        {
            string  strSql      = string.Format(@"  select p.cAdminName,d.lhd_xy,d.lhd_uptime,d.lhd_faxiantime,d.lhd_address,d.lhd_miaoshu,d.lhd_hiddenimage from Line_HiddenDanger d 
                                           left join P_Admin p on d.lhd_upname=p.iAdminID where d.lhd_id={0}", hdId);
            DataSet ContentList = APP.SQLServer_Helper.Query(strSql);

            Context.Response.Write(EasyUI_Pagination.ExportSuccess(ContentList.Tables[0], ContentList.Tables[0].Rows.Count));
        }
Esempio n. 3
0
        protected void getTaskStatus(string lpId)
        {
            string  strSql      = string.Format(@"select lpa.lpa_typeid,lpa.lpa_xy,lpa.lpa_id,lpa.lpa_jihuaname,lhd.lp_id as lhd_id from Line_Patrol lp
                                                    left join Line_PatrolArea lpa on lp.lp_fanwei = lpa.lpa_typeid
                                                    left join (select  distinct  lp_id,lpa_id,lpa_ids from Line_HiddenDanger group by lp_id,lpa_id,lpa_ids) lhd on lhd.lp_id = lp.lp_id and lhd.lpa_id = lpa.lpa_typeid and lhd.lpa_ids = lpa.lpa_id
                                                    where 1=1 and lp.lp_shenhe = '已审核' and lp.lp_id={0}", lpId);
            DataSet ContentList = APP.SQLServer_Helper.Query(strSql);

            Context.Response.Write(EasyUI_Pagination.ExportSuccess(ContentList.Tables[0], ContentList.Tables[0].Rows.Count));
        }
Esempio n. 4
0
        public override void Ashx_Load()
        {
            var sql = "";

            //变量赋值
            CheckRequery.checkNotNull("strSql", "", out sql);

            string  strSql      = sql;
            string  ErrInfo     = string.Empty;
            DataSet ContentList = APP.PGSQL_Helper.Query(strSql);

            Context.Response.Write(EasyUI_Pagination.ExportSuccess(ContentList.Tables[0], ContentList.Tables[0].Rows.Count));
        }
Esempio n. 5
0
        public override void Ashx_Load()
        {
            string ErrInfo_ = string.Empty;
            string pageIndex = "1", dataCount = "10", dataSort = "EventID desc", PersonId;
            string retStr = "{\"rows\":" + "/*Rows*/" + ",\"total\":/*Total*/" + ",\"ErrCode\":0}";

            CheckRequery.check("PersonId", out PersonId);
            CheckRequery.checkNotNull("page", out pageIndex);
            CheckRequery.checkNotNull("rows", out dataCount);
            string    sql    = string.Format(@"Select a.EventID,a.UpTime,a.EventAddress,a.EventX,a.EventY,a.EventPictures,a.EventDesc,a.PersonId, b.PersonName,c.EventFromName,d.DeptName,ET1.EventTypeName as EventType,ET2.EventTypeName as EventContent,f.UrgencyName,g.HandlerLevelName,wo.OperName 
              From M_Event as a 
              left join L_Person as b ON a.PersonId = b.PersonId 
              left join M_EventFrom as c ON a.EventFromId = c.EventFromId 
              left join L_Department as d ON a.DeptId = d.DeptId 
              left join (select EventTypeId, EventTypeName from M_EventType where ParentTypeId = 0) ET1 on a.EventTypeId = ET1.EventTypeId 
              left join (select EventTypeId, EventTypeName from M_EventType where ParentTypeId <> 0) ET2 on a.EventTypeId2 = ET2.EventTypeId 
              left join M_Urgency as f ON a.UrgencyId = f.UrgencyId 
              left join M_HandlerLevel as g ON a.HandlerLevelId = g.HandlerLevelId 
              left join L_Person p on a.DispatchPerson = p.PersonId 
              left join M_WorkOrder mw on mw.EventID = a.EventID and mw.OrderStatus = 0 
              left join (select MAX(OperId) OperId, OrderId from M_WorkOrder_Oper_History Group by OrderId) h ON mw.OrderId = h.OrderId 
              left join M_WorkOrder_Oper as wo on h.OperId = wo.OperId 
              Where a.DeleteStatus = 0 and a.PersonId = {0}", PersonId);
            DataTable dt     = APP.SQLServer_Helper.SelectDataTable(sql, out ErrInfo_);
            string    sqlStr = APP.MakeSqlByPage(sql, dataSort, Convert.ToInt16(pageIndex), Convert.ToInt16(dataCount));
            DataSet   ds     = APP.SQLServer_Helper.Query(sqlStr);

            if (string.IsNullOrEmpty(ErrInfo_))
            {
                Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter();
                timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd' 'HH':'mm':'ss";
                retStr = retStr.Replace("/*Total*/", ds.Tables[1].Rows[0][0].ToString()).Replace("/*Rows*/", JsonConvert.SerializeObject(ds.Tables[0], timeConverter));
                Context.Response.Write(retStr);
            }
            else
            {
                Context.Response.Write(EasyUI_Pagination.ExportErrMsg(ErrInfo_));
            }
        }
        public override void Ashx_Load()
        {
            string biaoming = "";

            CheckRequery.checkNotNull("biaoming", "", out biaoming);

            //string sql = "select count(0) from leakage.ptjsgx;";
            string sql = "select count(0) from " + biaoming;

            string    ErrInfo = string.Empty;
            DataTable dt      = new DataTable();


            dt = APP.PGSQL_Helper.SelectDataTable(sql.ToString(), out ErrInfo);

            if (string.IsNullOrEmpty(ErrInfo))
            {
                Context.Response.Write(EasyUI_Pagination.ExportSuccess(dt));
            }
            else
            {
                Context.Response.Write(EasyUI_Pagination.ExportErrMsg(ErrInfo));
            }
        }