Ejemplo n.º 1
0
        /// <summary>
        /// 初始化绑定数据
        /// </summary>
        private void StoreDataBind()
        {
            try
            {
                this.StorePlateType.DataSource = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:140001")); // tgsPproperty.GetPalteType();
                this.StorePlateType.DataBind();
                this.StoreStartStation.DataSource = tgsPproperty.GetStartStationInfo();
                this.StoreStartStation.DataBind();

                this.StorePecType.DataSource = GetRedisData.ChangColName(GetRedisData.GetData("Peccancy:WFXW"), true); //tgsPproperty.GetPeccancyType("isuse='1'");
                this.StorePecType.DataBind();
                DataTable deal = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240019"));                   // tgsPproperty.GetProcessType();
                this.StoreDealType.DataSource = deal;
                this.StoreDealType.DataBind();

                DataTable dt = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:140006"));// tgsPproperty.GetQueryNum();
                //  this.StoreQueryNum.DataSource = dt;
                // this.StoreQueryNum.DataBind();
                // if (dt.Rows.Count > 0)
                //    CmbQueryNum.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PeccancyAreaQuery.aspx-StoreDataBind", ex.Message + ";" + ex.StackTrace, "StoreDataBind has an exception");
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        ///将部门信息绑定至tree
        /// </summary>
        /// <param name="nodes"></param>
        private void BuildTree(Ext.Net.TreeNodeCollection nodes)
        {
            try
            {
                if (nodes == null)
                {
                    nodes = new Ext.Net.TreeNodeCollection();
                }

                Ext.Net.TreeNode root = new Ext.Net.TreeNode();
                root.Text = "组织机构";
                nodes.Add(root);
                root.Draggable  = true;
                root.Expandable = ThreeStateBool.True;
                root.Expanded   = true;

                DataTable dt = Bll.Common.ChangColName(ToDataTable(GetRedisData.GetData("t_cfg_department").Select("", "class asc,departid asc")));
                // DataTable dt = settingManager.GetDepartmentByWhere("1=1 and systemid='00' and class<='3'");
                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        Addree(dt, dt.Rows[0]["col2"].ToString(), root, null);
                    }
                }
            }
            catch
            {
            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                string username = Request.QueryString["username"];
                if (!userLogin.CheckLogin(username))
                {
                    string js = "alert('您没有登录或操作超时,请重新登录!');window.top.location.href='" + StaticInfo.LoginPage + "'";
                    System.Web.HttpContext.Current.Response.Write("<script type='text/javascript'>" + js + "</script>");
                    return;
                }
                if (!this.IsPostBack)
                {
                    lblDayCount.Text = GetRedisData.GetData("AlarmCount:TotalNumberOfAlarmToday").Rows[0]["zs"].ToString();                   //dataCountInfo.GetAlarmCarCountDay(DateTime.Now.ToString("yyyy-MM-dd"));

                    lblLastDay.Text = GetRedisData.GetData("AlarmCount:TotalNumberOfAlarmYesterday").Rows[0]["zs"].ToString();                //dataCountInfo.GetAlarmCarCountDay(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"));
                    int LastWeek = WeekOfYear(DateTime.Now) - 1;
                    lblLastWeek.Text  = GetRedisData.GetData("AlarmCount:ThisWeekTheTotalNumberOfAlarm").Rows[0]["zs"].ToString();            //dataCountInfo.GetAlarmCarCountWeek(LastWeek.ToString(), DateTime.Now.ToString("yyyy"));
                    lblLastMonth.Text = GetRedisData.GetData("AlarmCount:TheTotalNumberOfMonthlyReportToThePolice").Rows[0]["zs"].ToString(); //dataCountInfo.GetAlarmCarCountMonth(DateTime.Now.ToString("yyyy-MM"));

                    string date = DateTime.Now.ToString("yyyy-MM-dd");
                    this.ResourceManager1.RegisterAfterClientInitScript("chooseDate('" + date + "')");
                    this.DataBind();
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("AlarmDataCount.aspx-Page_Load", ex.Message + ";" + ex.StackTrace, "Page_Load发生异常");
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 创建部门列表树形菜单
        /// </summary>
        /// <param name="nodes"></param>
        private void BuildTree(Ext.Net.TreeNodeCollection nodes)
        {
            try
            {
                TreePanel1.RemoveAll(true);

                if (nodes == null)
                {
                    nodes = new Ext.Net.TreeNodeCollection();
                }

                Ext.Net.TreeNode root = new Ext.Net.TreeNode();

                nodes.Add(root);
                root.Draggable  = true;
                root.Expandable = ThreeStateBool.True;
                root.Expanded   = true;
                DataTable dt = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240050"));//把字典从400200改成240050   2016-11-17
                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        Addree(dt, "", root, null);
                    }
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("ImportantManager.aspx-BuildTree", ex.Message + ";" + ex.StackTrace, "BuildTree has an exception");
            }
        }
        /// <summary>
        /// 初始化绑定数据
        /// </summary>
        private void StoreDataBind()
        {
            try
            {
                DataTable dt = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240027"));
                if (dt == null || dt.Rows.Count <= 0)
                {
                    dt = logManager.GetLogType("00");
                }
                if (dt.Rows.Count > 0)
                {
                    dt.Rows.RemoveAt(0);
                    dt.Rows.RemoveAt(0);
                    dt.Rows.RemoveAt(0);
                    dt.Rows.RemoveAt(0);
                }

                StoreQuery.DataSource = dt;
                StoreQuery.DataBind();

                UserManager user = new UserManager();

                StoreCzyh.DataSource = user.GetAllUserName();
                StoreCzyh.DataBind();

                ButExcel.Disabled = true;
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("LogRunning.aspx-StoreDataBind", ex.Message + ";" + ex.StackTrace, "StoreDataBind发生异常");
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 将部门信息绑定至tree
        /// </summary>
        /// <param name="nodes"></param>
        /// <returns></returns>
        private void BuildTree(Ext.Net.TreeNodeCollection nodes)
        {
            try
            {
                TreeGrid1.RemoveAll(true);
                ClearInfoData();
                if (nodes == null)
                {
                    nodes = new Ext.Net.TreeNodeCollection();
                }
                Ext.Net.TreeNode root = new Ext.Net.TreeNode();
                root.Text = GetLangStr("KeyRoadManager53", "机构管理");
                nodes.Add(root);
                root.Draggable  = true;
                root.Expandable = ThreeStateBool.True;
                root.Expanded   = true;
                DataTable dt = Bll.Common.ChangColName(GetRedisData.GetData("t_cfg_department")); settingManager.GetConfigDepartment("00");

                if (dt != null && dt.Rows.Count > 0)
                {
                    Addree(dt, dt.Rows[0]["col2"].ToString(), root, null);
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("KeyRoadManager.aspx-BuildTree", ex.Message + ";" + ex.StackTrace, "BuildTree has an exception");
            }
            if (X.IsAjaxRequest)
            {
                TreeGrid1.Render(PanelNavigate, RenderMode.Auto);
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 绑定数据
        /// </summary>
        /// <returns></returns>
        private void StoreDataBind()
        {
            try
            {
                // 绑定查询条件开始卡口
                StoreStartStation.DataSource = tgsPproperty.GetStartStationInfo();
                StoreStartStation.DataBind();
                // 绑定展示 开始卡口
                StoreStartStationDict.DataSource = tgsPproperty.GetStationInfo("a.station_type_id in (02,03)");
                StoreStartStationDict.DataBind();

                this.StoreShow.DataSource = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240034")); //tgsPproperty.GetCommonDict("240034");
                this.StoreShow.DataBind();
                DataTable dtDirection = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240025"));     // tgsPproperty.GetDirectionDict();
                if (dtDirection.Rows[0][0].ToString().Equals("00"))
                {
                    dtDirection.Rows.RemoveAt(0);
                }
                this.StoreDirection.DataSource = dtDirection;
                this.StoreDirection.DataBind();
                DataTable dt = tgsPproperty.GetPeccancyAreaSetting("1=1");
                StorePecAreasetting.DataSource = dt;
                StorePecAreasetting.DataBind();
                if (dt.Rows.Count > 0)
                {
                    SelectFirst(dt.Rows[0]);
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PeccancyAreaSetting.aspx-DoYes", ex.Message + ";" + ex.StackTrace, "DoYes has an exception");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //判断用户是否登录
            string username = Request.QueryString["username"];

            if (!userLogin.CheckLogin(username))
            {
                string js = "alert('您没有登录或操作超时,请重新登录!');window.top.location.href='" + StaticInfo.LoginPage + "'";
                System.Web.HttpContext.Current.Response.Write("<script type='text/javascript'>" + js + "</script>");
                return;
            }
            //判断用户是否登录结束
            if (!X.IsAjaxRequest)
            {
                //this.StorePlateType.DataSource = tgsPproperty.GetPalteType();
                //this.StorePlateType.DataBind();
                this.StorePlateType.DataSource = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:140001"));
                this.StorePlateType.DataBind();
                dtStation = GetRedisData.GetData("Station:t_cfg_set_station");
                dtXsfx    = GetRedisData.GetData("t_sys_code:240025");//mapManager.GetFxcode();
                this.DateStartTime.SelectedDate = DateTime.Now;
                this.DateEndTime.SelectedDate   = DateTime.Now;
                this.TimeStart.Text             = DateTime.Now.ToString("00:00:00");
                this.TimeEnd.Text = DateTime.Now.ToString("23:59:59");
            }
        }
Ejemplo n.º 9
0
 private void GetChartPie(string datetime)
 {
     try
     {
         DataTable dtPassCarCount = null;
         if (DateTime.Now.ToString("yyyy-MM-dd").Equals(datetime))
         {
             dtPassCarCount = GetRedisData.GetData("PassCarCount:fzjg");
         }
         else if (DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd").Equals(datetime))
         {
             dtPassCarCount = GetRedisData.GetData("PassCarCount:fzjg_last");
         }
         else
         {
             dtPassCarCount = dataCountInfo.GetPassCarCountByType(datetime, "FZJG");
         }
         CreateChartDivPie2(dtPassCarCount, "main", datetime);
     }
     catch (Exception ex)
     {
         ILog.WriteErrorLog(ex);
         logManager.InsertLogError("WebPassCarVehHead.aspx-GetChartPie", ex.Message + ";" + ex.StackTrace, "GetChartPie has an exception");
     }
 }
Ejemplo n.º 10
0
 /// <summary>
 /// 绘制图标
 /// </summary>
 /// <param name="datetime"></param>
 private void GetChartLine(string datetime)
 {
     try
     {
         DataTable dtPassCar = null;
         LblFlow.Text = "";
         if (DateTime.Now.ToString("yyyy-MM-dd").Equals(datetime))
         {
             dtPassCar = GetRedisData.GetData("PassCarCountStation:" + Session["id"] as string);
         }
         else if (DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd").Equals(datetime))
         {
             dtPassCar = GetRedisData.GetData("PassCarCountStationLast:" + Session["id"] as string);
         }
         else
         {
             dtPassCar = dll.GetFlowByStation(Session["id"].ToString(), datetime);
         }
         if (dtPassCar != null)
         {
             CreateChartDiv(GetFlowStr(dtPassCar), datetime);
         }
     }
     catch (Exception ex)
     {
         ILog.WriteErrorLog(ex);
         logManager.InsertLogError("TgsShowStation.aspx-GetChartLine", ex.Message + ";" + ex.StackTrace, "GetChartLine has an exception");
     }
 }
        /// <summary>
        ///绑定下级部门及下级部门卡口
        /// </summary>
        /// <param name="root"></param>
        private void AddDepartTree(Ext.Net.TreeNode root, string departCode)
        {
            try
            {
                DataTable dtDepart = GetRedisData.GetData("t_cfg_department");
                DataRow[] rows     = dtDepart.Select("classcode='" + departCode + "'");
                if (rows != null)
                {
                    for (int i = 0; i < rows.Count(); i++)
                    {
                        Ext.Net.TreeNode nodeRoot = new Ext.Net.TreeNode();
                        nodeRoot.Text   = rows[i]["departname"].ToString();
                        nodeRoot.Leaf   = true;
                        nodeRoot.NodeID = rows[i]["departid"].ToString();
                        nodeRoot.Icon   = Icon.House;

                        DataTable dtStation   = GetRedisData.GetData("Station:t_cfg_set_station");
                        DataRow[] rowsStation = dtStation.Select(" departid='" + nodeRoot.NodeID + "' ", "station_name asc");
                        AddStationTree(nodeRoot, rowsStation);
                        nodeRoot.Expanded   = false;
                        nodeRoot.Draggable  = true;
                        nodeRoot.Expandable = ThreeStateBool.True;
                        AddDepartTree(nodeRoot, rows[i]["departid"].ToString());
                        root.Nodes.Add(nodeRoot);
                    }
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PassCarInfoCount.aspx-AddDepartTree", ex.Message + ";" + ex.StackTrace, "AddDepartTree has an exception");
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 初始化页面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <returns></returns>
        protected void Page_Load(object sender, EventArgs e)
        {
            string username = Request.QueryString["username"];

            if (!userLogin.CheckLogin(username))
            {
                string js = "alert('" + GetLangStr("Department18", "您没有登录或操作超时,请重新登录!") + "');window.top.location.href='" + StaticInfo.LoginPage + "'";
                System.Web.HttpContext.Current.Response.Write("<script type='text/javascript'>" + js + "</script>");
                return;
            }
            if (!X.IsAjaxRequest)
            {
                SystemID = "00";
                StoreClass.DataSource = GetRedisData.GetData("t_sys_code:140004");
                StoreClass.DataBind();

                DataTable dt = settingManager.GetConfigDepartment(SystemID);//Bll.Common.ChangColName(ToDataTable(GetRedisData.GetData("t_cfg_department").Select("", "class asc,departid asc")));
                while (dt.Columns.Count > 3)
                {
                    dt.Columns.RemoveAt(3);
                }
                dtSsjg = dt;

                Storedepart.DataSource = dt;
                jgname = dt.Rows[0]["col2"].ToString();
                Storedepart.DataBind();
                FirstGetSysConfig();
                UserInfo userinfo = Session["Userinfo"] as UserInfo;
                uName = userinfo.UserName;
                nowIp = userinfo.NowIp;
                logManager.InsertLogRunning(userinfo.UserName, GetLangStr("Department18", "访问:") + Request.QueryString["funcname"], userinfo.NowIp, "0");
            }
            this.DataBind();
        }
Ejemplo n.º 13
0
        private void CreateChartDivPie2(string datetime)
        {
            try
            {
                StringBuilder html  = new StringBuilder();
                string        title = GetLangStr("WebDevicePieData11", "厂家维度分析统计");

                DataTable dtCount = GetRedisData.GetData("DeviceDataCount:CJ");  //dataCountInfo.GetDeviceInfoByType(datetime, "CJ");

                string sp = string.Empty;
                for (int i = 0; i < dtCount.Rows.Count; i++)
                {
                    sp = sp + "{ value: " + dtCount.Rows[i][1].ToString() + ", name: '" + dtCount.Rows[i][0].ToString() + "' },";
                }
                string data1;
                if (string.IsNullOrEmpty(sp))
                {
                    data1 = " data: []";
                }
                else
                {
                    data1 = " data: [" + sp + "]";
                }
                html.AppendLine(CreatePieChart2("main", title, GetLangStr("WebDevicePieData12", "设备厂家"), data1));
                this.ResourceManager1.RegisterAfterClientInitScript(html.ToString());
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("WebDevicePieData1.aspx-CreateChartDivPie2", ex.Message + ";" + ex.StackTrace, "CreateChartDivPie2 has an exception");
            }
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 刷新事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void DataSourceRefresh(object sender, StoreRefreshDataEventArgs e)
        {
            try
            {
                if (this.CmbDataSource.Value != null && CmbDataSource.SelectedIndex != -1)
                {
                    DataTable ddbh = new DataTable();
                    this.StoreLocation.DataSource = tgsPproperty.GetStationInfo("b.datasource='" + this.CmbDataSource.Value.ToString() + "' and b.istmsshow ='1'");
                    this.StoreLocation.DataBind();
                }
                else
                {
                    //DataTable ddbh = new DataTable();
                    //this.StoreLocation.DataSource = tgsPproperty.GetStationInfo("b.istmsshow ='1'");
                    //this.StoreLocation.DataBind();

                    this.StoreLocation.DataSource = ChangColName(GetRedisData.GetData("Station:t_cfg_set_station_type_istmsshow"));
                    this.StoreLocation.DataBind();
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PeccancyDelete.aspx-DataSourceRefresh", ex.Message + ";" + ex.StackTrace, "DataSourceRefresh has an exception");
            }
        }
Ejemplo n.º 15
0
 /// <summary>
 /// 初始化道路
 /// </summary>
 /// <param name="datetime"></param>
 /// <returns></returns>
 private void InitRoad(string datetime)
 {
     try
     {
         if (datetime == DateTime.Now.ToString("yyyy-MM-dd"))
         {
             dsroad = GetRedisData.GetData("PassCarCount:hotspot_keyroad");//dataCountInfo.GetPassCarHotSpot(datetime, "ZDDL");
         }
         if (datetime == DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"))
         {
             dsroad = GetRedisData.GetData("PassCarCount:hotspot_keyroad_last");
         }
         else
         {
             dsroad = bll.GetCarHotRoad(datetime);
         }
         //GetRedisData.GetData("PassCarCount:hotspot_keyroad");//dataCountInfo.GetPassCarHotSpot(datetime, "ZDDL");
         if (dsroad != null)
         {
             StoreRoad.DataSource = dsroad;;
             StoreRoad.DataBind();
             this.ResourceManager1.RegisterAfterClientInitScript("isScroll();");
         }
     }
     catch (Exception ex)
     {
         ILog.WriteErrorLog(ex);
         logManager.InsertLogError("LogRunning.aspx-InitRoad", ex.Message + ";" + ex.StackTrace, "InitRoad has an exception");
     }
 }
Ejemplo n.º 16
0
        /// <summary>
        /// 组件 报警类型树
        /// </summary>
        /// <param name="nodes"></param>
        /// <returns></returns>
        private Ext.Net.TreeNodeCollection BuildTreeAlarm(Ext.Net.TreeNodeCollection nodes)
        {
            try
            {
                if (nodes == null)
                {
                    nodes = new Ext.Net.TreeNodeCollection();
                }

                Ext.Net.TreeNode root = new Ext.Net.TreeNode();
                root.Text = "Root";
                nodes.Add(root);
                root.Expanded = true;
                DataTable dt = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:420700"));// tgsPproperty.GetAlarmTypeDict();

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    Ext.Net.TreeNode node = new Ext.Net.TreeNode();
                    node.Text     = dt.Rows[i][1].ToString();
                    node.Icon     = Icon.Note;
                    node.NodeID   = dt.Rows[i][0].ToString();
                    node.Checked  = ThreeStateBool.False;
                    node.Expanded = true;
                    root.Nodes.Add(node);
                }

                return(nodes);
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("FlowMonitor.aspx-BuildTreeAlarm", ex.Message, "BuildTreeAlarm has an exception");
                return(null);
            }
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 数据绑定
        /// </summary>
        private void StoreDataBind()
        {
            try
            {
                DataTable            dt  = GetDataOfPeccancyAreaSetting();
                System.Data.DataView dv  = new System.Data.DataView(dt);
                DataTable            dt3 = dv.ToTable(true, new string[] { "col1", "col10" });

                StoreStartStation.DataSource = dt3;
                StoreStartStation.DataBind();
                StoreStartStationDict.DataSource = tgsPproperty.GetStationInfo("a.station_type_id in (02,03)");
                StoreStartStationDict.DataBind();
                this.StoreShow.DataSource = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240034"));      //tgsPproperty.GetCommonDict("240034");
                this.StoreShow.DataBind();
                this.StoreDirection.DataSource = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240025")); // tgsPproperty.GetDirectionDict();
                this.StoreDirection.DataBind();

                StorePecAreasetting.DataSource = dt;
                StorePecAreasetting.DataBind();
                if (dt.Rows.Count > 0)
                {
                    SelectFirst(dt.Rows[0]);
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PeccancyAreaSetting.aspx-StoreDataBind", ex.Message + ";" + ex.StackTrace, "StoreDataBind has an exception");
            }
        }
Ejemplo n.º 18
0
 private void GetChartLineRoad(string datetime)
 {
     try
     {
         LblFlow.Text = "车流总量:" + dll.GetFlowByRoadCount(Session["id"].ToString(), datetime);
         DataTable dtPassCar = null, dtPassAvg = null;
         if (DateTime.Now.ToString("yyyy-MM-dd").Equals(datetime))
         {
             dtPassCar = GetRedisData.GetData("PassCarCountRoad:" + Session["id"] as string);
             dtPassAvg = GetRedisData.GetData("PassCarCountRoadAvg:" + Session["id"] as string);
         }
         else if (DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd").Equals(datetime))
         {
             dtPassCar = GetRedisData.GetData("PassCarCountRoadLast:" + Session["id"] as string);
             dtPassAvg = GetRedisData.GetData("PassCarCountRoadAvgLast:" + Session["id"] as string);
         }
         else
         {
             dtPassCar = dll.GetFlowByRoad(Session["id"].ToString(), datetime);
             dtPassAvg = dll.GetFlowByRoadAvg(Session["id"].ToString(), datetime);
         }
         if (dtPassCar != null)
         {
             CreateChartDiv(GetFlowRoad(dtPassCar, dtPassAvg), datetime);
         }
     }
     catch (Exception ex)
     {
         ILog.WriteErrorLog(ex);
         logManager.InsertLogError("TgsShowStation.aspx-GetChartLineRoad", ex.Message + ";" + ex.StackTrace, "GetChartLineRoad has an exception");
     }
 }
Ejemplo n.º 19
0
        /// <summary>
        /// 重置事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <summary>
        /// 获取已存在的监测信息卡口
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //protected void BSearch_DirectClick(object sender, DirectEventArgs e)
        //{
        //    try
        //    {
        //        KkmcDataBind();
        //    }
        //    catch (Exception ex)
        //    {
        //        ILog.WriteErrorLog(ex);
        //    }
        //}

        #endregion 控件事件

        #region 私有方法

        /// <summary>
        /// 初始化绑定数据
        /// </summary>
        private void StoreDataBind()
        {
            DataTable table  = new DataTable();
            DataTable table2 = new DataTable();

            try
            {
                table  = Bll.Common.ChangColName(GetRedisData.GetData("Station:t_cfg_set_station"));// tgsPproperty.GetStationInfo("1=1");
                table2 = GetBindKkid();
                this.Skkmc2.DataSource = table2;
                this.Skkmc2.DataBind();
                DataTable dtNew = table.Clone();

                DataRow[] arrRows;
                foreach (DataRow row in table2.Rows)
                {
                    arrRows = table.Select("col0='" + row["col1"].ToString() + "'");
                    foreach (DataRow row2 in arrRows)
                    {
                        table.Rows.Remove(row2);
                    }
                }
                table.Columns["col2"].ColumnName = "col3";
                table.Columns["col1"].ColumnName = "col2";
                table.Columns["col0"].ColumnName = "col1";
                Session["dataKkmc"]   = table;
                this.Skkmc.DataSource = table;
                this.Skkmc.DataBind();
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("ImportantRule.aspx-StoreDataBind", ex.Message + ";" + ex.StackTrace, "StoreDataBind has an exception");
            }
        }
Ejemplo n.º 20
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        private void StoreDataBind()
        {
            try
            {
                DataTable dt1 = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:140001"));
                if (dt1 != null)
                {
                    //车俩类型
                    this.StorePlateType.DataSource = dt1;
                    this.StorePlateType.DataBind();
                }
                else
                {
                    this.StorePlateType.DataSource = tgsPproperty.GetPalteType();
                    this.StorePlateType.DataBind();
                }
                DataTable dt2 = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240018"));
                if (dt2 != null)
                {
                    //比对类型
                    this.StoreMdlx.DataSource = dt2;
                    this.StoreMdlx.DataBind();
                }
                else
                {
                    this.StoreMdlx.DataSource = tgsPproperty.GetChecklessDict();
                    this.StoreMdlx.DataBind();
                }

                DataTable dt3 = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240013"));
                if (dt3 != null)
                {
                    //车辆颜色
                    this.StoreColor.DataSource = dt3;
                    this.StoreColor.DataBind();
                }
                else
                {
                    this.StoreColor.DataSource = tgsPproperty.GetCarColorDict();
                    this.StoreColor.DataBind();
                }
                DataTable dt4 = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240010"));
                if (dt4 != null)
                {
                    //比对标志
                    this.StoreBdbj.DataSource = dt4;
                    this.StoreBdbj.DataBind();
                }
                else
                {
                    this.StoreBdbj.DataSource = tgsPproperty.GetIsCompareDict();
                    this.StoreBdbj.DataBind();
                }

                ChecklessDataBind("1=1");
                TxtGxsj.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            }
            catch { }
        }
        // [DirectMethod]
        //public void GetKakou()
        //{
        //    string value = this.FieldStation.Value.ToString();
        //    string text = this.FieldStation.Text.ToString();
        //    if (text.Contains("总队") || text.Contains("支队") || text.Contains("大队") || text.Contains("中队"))
        //    {
        //        if (text.Contains(","))
        //        {
        //        }
        //        else
        //        {
        //            DataTable dt = GetRedisData.GetData("Station:t_cfg_set_station");
        //            DataRow[] rows = dt.Select("departid='" + value + "'");
        //            if (rows != null)
        //            {
        //                for (int i = 0; i < rows.Count(); i++)
        //                {
        //                }
        //            }

        //        }
        //    }
        //    else
        //    {
        //    }
        //}
        /// <summary>
        ///绑定下级部门及下级部门卡口
        /// </summary>
        /// <param name="root"></param>
        private void AddDepartTree(Ext.Net.TreeNode root, string departCode)
        {
            try
            {
                DataTable dtDepart = GetRedisData.GetData("t_cfg_department");
                DataRow[] rows     = dtDepart.Select("classcode='" + departCode + "'", "class asc");
                if (rows != null)
                {
                    for (int i = 0; i < rows.Count(); i++)
                    {
                        Ext.Net.TreeNode nodeRoot = new Ext.Net.TreeNode();
                        nodeRoot.Text    = rows[i]["departname"].ToString();
                        nodeRoot.Leaf    = true;
                        nodeRoot.NodeID  = rows[i]["departid"].ToString();
                        nodeRoot.Icon    = Icon.House;
                        nodeRoot.Checked = ThreeStateBool.False;//加的部门选择框
                        nodeRoot.Qtip    = "Bumen";
                        DataTable dtStation   = GetRedisData.GetData("Station:t_cfg_set_station");
                        DataRow[] rowsStation = dtStation.Select(" departid='" + nodeRoot.NodeID + "' ", "station_name asc");
                        AddStationTree(nodeRoot, rowsStation);
                        nodeRoot.Expanded   = false;
                        nodeRoot.Draggable  = true;
                        nodeRoot.Expandable = ThreeStateBool.True;
                        AddDepartTree(nodeRoot, rows[i]["departid"].ToString());
                        root.Nodes.Add(nodeRoot);
                    }
                }
                //DataTable dtDepart = settingManager.GetLowerDepartment(departCode);
                //if (dtDepart != null && dtDepart.Rows.Count > 0)
                //{
                //    for (int i = 0; i < dtDepart.Rows.Count; i++)
                //    {
                //        Ext.Net.TreeNode nodeRoot = new Ext.Net.TreeNode();
                //        nodeRoot.Text = dtDepart.Rows[i][2].ToString();//departname
                //       // nodeRoot.Text = dtDepart.Rows[i]["departname"].ToString();
                //        nodeRoot.Leaf = true;
                //        nodeRoot.NodeID = dtDepart.Rows[i][1].ToString();//departid
                //       // nodeRoot.NodeID = dtDepart.Rows[i]["departid"].ToString();
                //        nodeRoot.Icon = Icon.House;

                //        //string strStation = redisClient.GetRedisValue("Station:t_cfg_set_station");
                //        //DataTable dtStation = GetRedisData.GetData(strStation);
                //        //DataRow[] rowsStation = dtStation.Select(" departid='" + nodeRoot.NodeID + "' ");
                //        DataTable dtStation = tgsPproperty.GetStationInfo(" departid='" + nodeRoot.NodeID + "' ");
                //        AddStationTree(nodeRoot, dtStation);
                //        nodeRoot.Expanded = false;
                //        nodeRoot.Draggable = true;
                //        nodeRoot.Expandable = ThreeStateBool.True;
                //        AddDepartTree(nodeRoot, dtDepart.Rows[i]["departid"].ToString());
                //        root.Nodes.Add(nodeRoot);
                //    }
                //}
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
            }
        }
        /// <summary>
        /// 组件卡口列表树
        /// </summary>
        /// <param name="nodes"></param>
        /// <returns></returns>
        private Ext.Net.TreeNodeCollection BuildTree(Ext.Net.TreeNodeCollection nodes)
        {
            try
            {
                if (nodes == null)
                {
                    nodes = new Ext.Net.TreeNodeCollection();
                }
                nodes.Clear();

                Ext.Net.TreeNode root = new Ext.Net.TreeNode();
                root.Text = GetLangStr("PasscarAllQuery27", "卡口列表");
                nodes.Add(root);
                root.Draggable  = true;
                root.Expandable = ThreeStateBool.True;
                root.Expanded   = true;

                // 添加 自己机构节点 和卡口
                UserInfo user = Session["userinfo"] as UserInfo;
                if (user == null)
                {
                    user            = new UserInfo();
                    user.DepartName = GetLangStr("PasscarAllQuery28", "滨州市交通警察支队");
                    user.DeptCode   = "371600000000";
                }

                Ext.Net.TreeNode nodeRoot = new Ext.Net.TreeNode();
                nodeRoot.Text    = user.DepartName;
                nodeRoot.Leaf    = true;
                nodeRoot.NodeID  = user.DeptCode;
                nodeRoot.Icon    = Icon.House;
                nodeRoot.Qtip    = "Bumen";
                nodeRoot.Checked = ThreeStateBool.False;//加的部门选择框
                DataTable dtStation   = GetRedisData.GetData("Station:t_cfg_set_station");
                DataRow[] rowsStation = dtStation.Select("departid='" + user.DeptCode + "'", "station_name asc");
                AddStationTree(nodeRoot, rowsStation);
                //DataTable dtStation = tgsPproperty.GetStationInfo(" departid='" + user.DeptCode + "' ");
                //AddStationTree(nodeRoot, dtStation);

                nodeRoot.Expanded   = false;
                nodeRoot.Draggable  = true;
                nodeRoot.Expandable = ThreeStateBool.True;
                root.Nodes.Add(nodeRoot);

                //绑定下级部门及下级部门卡口
                AddDepartTree(root, user.DeptCode);

                return(nodes);
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                return(null);
            }
        }
Ejemplo n.º 23
0
        /// <summary>
        /// 初始化监测点
        /// </summary>
        /// <returns></returns>
        private void InitStation()
        {
            try
            {
                string head    = "<div class=\"map-up-r-container\"><ul class=\"progress-bar\">";
                string end     = "</ul></div>";
                string content = "";
                string color   = "green-bg";
                dsstation = GetRedisData.GetData("PassCarCount:hotspot_station");// bll.GetCarHotStation();
                if (dsstation != null && dsstation.Rows.Count > 0)
                {
                    float gwbl = 0;
                    for (int row = 0; row < dsstation.Rows.Count; row++)
                    {
                        if (dsstation.Rows[row]["gwbl"].ToString() == "")
                        {
                            gwbl = 0;
                        }
                        else
                        {
                            gwbl = float.Parse(dsstation.Rows[row]["gwbl"].ToString());
                        }
                        if (gwbl < 30)
                        {
                            color = "green-bg";
                        }
                        if (gwbl > 30)
                        {
                            color = "yellow-bg";
                        }

                        if (gwbl > 70)
                        {
                            color = "orange_bg";
                        }
                        content += "<li class=\"display-table row\">" +
                                   " <span class=\"table-cell small-6 pro-ad\">" + row.ToString() + "." + dsstation.Rows[row]["kkmc"].ToString() + "</span>" +
                                   "<div class=\"table-cell small-4 pro-bar\">" +
                                   " <span class=\"pro-bg\">" +
                                   "<i class=\"pro-step " + color + "\" style=\"width:" + dsstation.Rows[row]["gwbl"].ToString() + "%;\"></i>" +
                                   "</span>" + " </div>" +
                                   "<span class=\"table-cell small-2 pro-persent text-right\">" + dsstation.Rows[row]["gwbl"].ToString() + "%</span>" +
                                   "</li>";
                    }
                    Tab1.Html = head + content + end;
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("LogRunning.aspx-InitStation", ex.Message + ";" + ex.StackTrace, "InitStation has an exception");
            }
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 重置事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ButResetClick(object sender, DirectEventArgs e)
        {
            try
            {
                starttime = DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
                endtime   = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                string timeJs = "clearTime('" + starttime + "','" + endtime + "');";//js方法后面的分号一定要加上
                this.ResourceManager1.RegisterAfterClientInitScript(timeJs);
                this.uiDepartment.Reset();
                this.CmbPecType.Reset();
                this.CmbPlateType.Reset();
                this.CmbLocation.Reset();
                this.CmbDataSource.Reset();
                // CmbDealType.SelectedIndex = 0;
                this.TxtplateId.Reset();
                this.ChkLike.Reset();
                this.CmbDirection.Reset();
                this.CmbDealType.Reset();
                this.WindowEditor1.SetVehicleText("");
                if (Session["location"] != null)
                {
                    Session["location"] = null;
                }
                //违法地点
                DataTable dt2 = GetRedisData.GetData("Station:t_cfg_set_station_type_istmsshow");
                if (dt2 != null)
                {
                    this.StoreLocation.DataSource = ChangColName(dt2);
                    this.StoreLocation.DataBind();
                }
                else
                {
                    this.StoreLocation.DataSource = tgsPproperty.GetStationInfo("b.istmsshow ='1'");
                    this.StoreLocation.DataBind();
                }

                //行驶方向
                DataTable dt6 = GetRedisData.GetData("t_sys_code:240025");
                if (dt6 != null)
                {
                    this.StoreDirection.DataSource = GetRedisData.ChangColName(dt6, true);
                    this.StoreDirection.DataBind();
                }
                else
                {
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PeccancyCheck.aspx-ButResetClick", ex.Message + ";" + ex.StackTrace, "ButResetClick has an exception");
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        ///开始绑定数据
        /// </summary>
        private void StartDataBind()
        {
            //UserInfo userInfo = System.Web.HttpContext.Current.Session["userinfo"] as UserInfo;
            //DataTable ddbh = new DataTable();
            //ddbh = tgsPproperty.GetUserStationInfo(userInfo.UserCode, "2");

            //if (ddbh == null || ddbh.Rows.Count <= 0)
            //{
            //    ddbh = tgsPproperty.GetStationInfo("b.istmsshow ='1'");
            //}
            //this.StoreLocation.DataSource = ddbh;
            //this.StoreLocation.DataBind();
            DataTable dt1 = GetRedisData.GetData("Station:t_cfg_set_station_type_istmsshow");

            if (dt1 != null)
            {
                this.StoreLocation.DataSource = GetRedisData.ChangColName(dt1, true);
                this.StoreLocation.DataBind();
            }
            else
            {
                this.StoreLocation.DataSource = tgsPproperty.GetStationInfo("b.istmsshow ='1'");
                this.StoreLocation.DataBind();
            }

            //车俩类型
            DataTable dt2 = GetRedisData.GetData("t_sys_code:140001");

            if (dt2 != null)
            {
                this.StorePlateType.DataSource = GetRedisData.ChangColName(dt2, true);
                this.StorePlateType.DataBind();
            }
            else
            {
                this.StorePlateType.DataSource = tgsPproperty.GetPalteType();
                this.StorePlateType.DataBind();
            }
            //违法行为
            DataTable dt3 = GetRedisData.GetData("Peccancy:WFXW");

            if (dt3 != null)
            {
                this.StorePeccancyType.DataSource = GetRedisData.ChangColName(dt3, true);
                this.StorePeccancyType.DataBind();
            }
            DataTable dt4 = settingManager.GetConfigInfo("00", "06");

            if (dt4 != null)
            {
                Session["plateHead"] = dt4.Rows[0]["col3"].ToString();
            }
        }
Ejemplo n.º 26
0
        /// <summary>
        /// 初始化监测点
        /// </summary>
        private void InitStation()
        {
            try
            {
                DataTable dt2 = GetRedisData.GetData("Station:t_cfg_set_station_type_istmsshow");//

                if (dt2 != null)
                {
                    this.station.DataSource = Dt_Station = Bll.Common.ChangColName(dt2);
                    this.station.DataBind();
                }
                else
                {
                    Dt_Station = dt2 = Bll.Common.ChangColName(bll.GetStation().Tables[0]);
                }
                DataTable dt3 = GetRedisData.GetData("t_sys_code:240025");
                //行驶方向
                if (dt3 != null)
                {
                    Dt_xsfx = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240025"));
                }
                else
                {
                    Dt_xsfx = Bll.Common.ChangColName(bll.GetFxcode());
                }
                dtCsys = GetRedisData.GetData("t_sys_code:240013"); //bll.GetCsys();
                if (dtCsys != null)
                {
                    this.csys.DataSource = Bll.Common.ChangColName(dtCsys);
                    this.csys.DataBind();
                }
                else
                {
                    dtCsys = Bll.Common.ChangColName(bll.GetCsys().Tables[0]);
                }
                DataTable dt1 = GetRedisData.GetData("t_sys_code:140001"); //bll.GetCllx();
                if (dt1 != null)
                {
                    this.cllx.DataSource = Bll.Common.ChangColName(dt1);
                    this.cllx.DataBind();
                }
                else
                {
                    dt1 = Bll.Common.ChangColName(bll.GetCllx().Tables[0]);
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("OneCarMulLisence.aspx-InitStation", ex.Message + ";" + ex.StackTrace, "InitStation has an exception");
            }
        }
        /// <summary>
        /// 组件卡口列表树
        /// </summary>
        /// <param name="nodes"></param>
        /// <returns></returns>
        private Ext.Net.TreeNodeCollection BuildTree(Ext.Net.TreeNodeCollection nodes)
        {
            try
            {
                if (nodes == null)
                {
                    nodes = new Ext.Net.TreeNodeCollection();
                }

                Ext.Net.TreeNode root = new Ext.Net.TreeNode();
                root.Text = "卡口列表";
                nodes.Add(root);
                root.Draggable  = true;
                root.Expandable = ThreeStateBool.True;
                root.Expanded   = true;

                // 添加 自己机构节点 和卡口
                UserInfo user = Session["userinfo"] as UserInfo;
                if (user == null)
                {
                    user            = new UserInfo();
                    user.DepartName = "滨州市交通警察支队";
                    user.DeptCode   = "371600000000";
                }

                Ext.Net.TreeNode nodeRoot = new Ext.Net.TreeNode();
                nodeRoot.Text   = user.DepartName;
                nodeRoot.Leaf   = true;
                nodeRoot.NodeID = user.DeptCode;
                nodeRoot.Icon   = Icon.House;

                DataTable dtStation   = GetRedisData.GetData("Station:t_cfg_set_station");
                DataRow[] rowsStation = dtStation.Select("departid='" + user.DeptCode + "'", "station_name asc");
                AddStationTree(nodeRoot, rowsStation);

                nodeRoot.Expanded   = false;
                nodeRoot.Draggable  = true;
                nodeRoot.Expandable = ThreeStateBool.True;
                root.Nodes.Add(nodeRoot);

                //绑定下级部门及下级部门卡口
                AddDepartTree(root, user.DeptCode);

                return(nodes);
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PassCarInfoCount.aspx-BuildTree", ex.Message + ";" + ex.StackTrace, "BuildTree has an exception");
                return(null);
            }
        }
        private void StartDataBind()
        {
            this.StorePlateType.DataSource = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:140001")); // tgsPproperty.GetPalteType();
            this.StorePlateType.DataBind();

            this.StoreLocation.DataSource = tgsPproperty.GetStationInfo("a.station_type_id in (01,02,03,06,07,08)");
            this.StoreLocation.DataBind();

            this.StorePeccancyType.DataSource = GetRedisData.ChangColName(GetRedisData.GetData("Peccancy:WFXW"), true);//tgsPproperty.GetPeccancyType("isuse='1'");
            this.StorePeccancyType.DataBind();

            Session["plateHead"] = settingManager.GetConfigInfo("00", "06").Rows[0]["col3"].ToString();
        }
Ejemplo n.º 29
0
 private void GetChartLine(string datetime)
 {
     try
     {
         StoreFlow.DataSource = Bll.GetRedisData.ChangColName(GetRedisData.GetData("DeviceDataCount:YCZS"), true); //dataCountInfo.GetDeviceInfoByType(datetime, "YCZS");
         StoreFlow.DataBind();
     }
     catch (Exception ex)
     {
         ILog.WriteErrorLog(ex);
         logManager.InsertLogError("WebDeviceGrid.aspx-GetChartLine", ex.Message + ";" + ex.StackTrace, "GetChartLine has an exception");
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            string username = Request.QueryString["username"]; if (!userLogin.CheckLogin(username))

            {
                string js = "alert('您没有登录或操作超时,请重新登录!');window.top.location.href='" + StaticInfo.LoginPage + "'"; System.Web.HttpContext.Current.Response.Write("<script type='text/javascript'>" + js + "</script>"); return;
            }

            if (!X.IsAjaxRequest)
            {
                try
                {
                    dtStation = tgsPproperty.GetStationInfo("1=1");
                    // BuildTree(TreeStation.Root);
                    //CBkk.DataSource = dtStation;
                    //CBkk.DataBind();
                    DataTable dt1 = GetRedisData.GetData("t_sys_code:240025");
                    if (dt1 != null)
                    {
                        dtXsfx = Bll.Common.ChangColName(dt1);
                    }
                    else
                    {
                        dtXsfx = mapManager.GetFxcode();
                    }

                    if (Session["Condition"] != null)
                    {
                        Condition con = Session["Condition"] as Condition;
                        starttime = start.InnerText = con.StartTime;
                        endtime   = end.InnerText = con.EndTime;
                        //FieldStation.SetValue(con.Kkid, con.Kkidms);
                        kakou.Value   = con.Kkidms;
                        kakouId.Value = con.Kkid;
                        //CBkk2.Value = con.Kkid;
                        CBZjs.Checked        = con.Zjsaqd;
                        CBFjs.Checked        = con.Fjsaqd;
                        con.Zdmb             = "1";
                        Session["Condition"] = con;
                    }
                    QueryFaceShelter(1);
                    UserInfo userinfo = Session["Userinfo"] as UserInfo;
                    logManager.InsertLogRunning(userinfo.UserName, "访问:遮挡面部", userinfo.NowIp, "0");
                }
                catch (Exception ex)
                {
                    ILog.WriteErrorLog(ex);
                    logManager.InsertLogError("FaceShelterQuery.aspx-Page_Load", ex.Message + ";" + ex.StackTrace, "Page_Load has an exception");
                }
            }
        }