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 { Scplx.DataSource = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:140001"));// tgsPproperty.GetDeviceTypeDict("140001"); Scplx.DataBind(); Skkmc.DataSource = tgsPproperty.GetStationInfo("1=1"); Skkmc.DataBind(); Sxsfx.DataSource = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240025"));// tgsPproperty.GetDirectionDict(); Sxsfx.DataBind(); if (Session["Condition"] != null) { Condition con = Session["Condition"] as Condition; start.InnerText = con.StartTime; end.InnerText = con.EndTime; CBcplx.Value = con.Hpzl; CBkkmc.Value = con.Kkid; CBxsfx.Value = con.Xsfx; vehicleHead.SetVehicleText(con.Sqjc); TFcphm.Text = con.Hphm; } } catch (Exception ex) { ILog.WriteErrorLog(ex); } } }
/// <summary> /// 页面加载时候执行 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> 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 = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:140001")); // tgsPproperty.GetPalteType(); this.StorePlateType.DataBind(); this.StoreStartStation.DataSource = tgsPproperty.GetStartStationInfo(); this.StoreStartStation.DataBind(); DataTable deal = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240019")); // tgsPproperty.GetProcessType(); this.StoreDealType.DataSource = deal; this.StoreDealType.DataBind(); this.StorePecType.DataSource = GetRedisData.ChangColName(GetRedisData.GetData("Peccancy:WFXW"), true); //tgsPproperty.GetPeccancyType("isuse='1'"); this.StorePecType.DataBind(); DataTable dt = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:140006")); // tgsPproperty.GetQueryNum(); // this.StoreQueryNum.DataSource = dt; // this.StoreQueryNum.DataBind(); starttime = start.InnerText = DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); endtime = end.InnerText = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); TbutQueryClick(null, null); UserInfo userinfo = Session["Userinfo"] as UserInfo; //// if (dt.Rows.Count > 0) //// CmbQueryNum.SelectedIndex = 0; //// this.Panel2.Title = "查询结果:共计查询出符合条件的记录0条,现在显示0条"; logManager.InsertLogRunning(userinfo.UserName, "访问:" + Request.QueryString["funcname"], userinfo.NowIp, "0"); } }
/// <summary> /// 页面初始化 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { string username = Request.QueryString["username"]; if (!userLogin.CheckLogin(username)) { string js = "alert('" + GetLangStr("PoliceOfficer16", "您没有登录或操作超时,请重新登录!") + "');window.top.location.href='" + StaticInfo.LoginPage + "'"; System.Web.HttpContext.Current.Response.Write("<script type='text/javascript'>" + js + "</script>"); return; } if (!X.IsAjaxRequest) { BuildTree(TreePanel1.Root); StoreDataBind(); GridDataBind(GetWhere()); this.DataBind(); UserInfo userinfo = Session["Userinfo"] as UserInfo; uName = userinfo.UserName; nowIp = userinfo.NowIp; logManager.InsertLogRunning(userinfo.UserName, GetLangStr("PoliceOfficer17", "访问:") + Request.QueryString["funcname"], userinfo.NowIp, "0"); } }
/// <summary> /// 页面加载事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> 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) { //userLogin.IsLoginPage(this); BuildTree(TreePanel1.Root);//, "a.station_type_id in (01,02,03,06,07,08)"); BuildTreeAlarm(TreePanel2.Root); StoreDataBind(); Session["MonitorId"] = ""; this.DataBind(); UserInfo userinfo = Session["Userinfo"] as UserInfo; logManager.InsertLogRunning(userinfo.UserName, "访问:报警监控", userinfo.NowIp, "0"); } }
/// <summary> /// 初始化页面 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { string username = Request.QueryString["username"]; if (!userLogin.CheckLogin(username)) { string js = "alert('" + GetLangStr("PeccancyQuery35", "您没有登录或操作超时,请重新登录!") + "');window.top.location.href='" + StaticInfo.LoginPage + "'"; System.Web.HttpContext.Current.Response.Write("<script type='text/javascript'>" + js + "</script>"); return; } if (!X.IsAjaxRequest) { StoreDataBind(); DataSetDateTime(); this.DataBind(); this.lblCurpage.Text = "1"; this.lblAllpage.Text = "0"; this.lblRealcount.Text = "0"; UserInfo userinfo = Session["Userinfo"] as UserInfo; logManager.InsertLogRunning(userinfo.UserName, GetLangStr("PeccancyQuery36", "访问:") + Request.QueryString["funcname"], userinfo.NowIp, "0"); } this.DataBind(); }
/// <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("PeccancyDataCount6", "您没有登录或操作超时,请重新登录!") + "');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("PeccancyCount:TodayItIsIllegalTo").Rows[0]["zs"].ToString(); //dataCountInfo.GetPeccCarCountDay(DateTime.Now.ToString("yyyy-MM-dd")); lblLastDay.Text = GetRedisData.GetData("PeccancyCount:YesterdayIsIllegal").Rows[0]["zs"].ToString(); //dataCountInfo.GetPeccCarCountDay(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")); int LastWeek = WeekOfYear(DateTime.Now) - 1; lblLastWeek.Text = GetRedisData.GetData("PeccancyCount:ThisWeekTheIllegal").Rows[0]["zs"].ToString(); //dataCountInfo.GetPeccCarCountWeek(LastWeek.ToString(), DateTime.Now.ToString("yyyy")); lblLastMonth.Text = GetRedisData.GetData("PeccancyCount:ThisMonthTheIllegal").Rows[0]["zs"].ToString(); //dataCountInfo.GetPeccCarCountMonth(DateTime.Now.ToString("yyyy-MM")); string date = DateTime.Now.ToString("yyyy-MM-dd"); this.ResourceManager1.RegisterAfterClientInitScript("chooseDate('" + date + "')"); this.DataBind(); } }
/// <summary> /// Handles the Load event of the Page control. /// </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("CurrentDataCount13", "您没有登录或操作超时,请重新登录!") + "');window.top.location.href='" + StaticInfo.LoginPage + "'"; System.Web.HttpContext.Current.Response.Write("<script type='text/javascript'>" + js + "</script>"); return; } if (!X.IsAjaxRequest) { CountDay.Value = DateTime.Now.ToString("yyyy-MM-dd"); lblDayCount.Text = GetRedisData.GetCount("PassCarCount:passcount"); //dataCountInfo.GetPassCarCountDay(DateTime.Now.ToString("yyyy-MM-dd")); lblDayOnline.Text = GetRedisData.GetCount("PassCarCount:passcount_online"); //dataCountInfo.GetOnlineCarCountDay(DateTime.Now.ToString("yyyy-MM-dd")); lblLastDay.Text = GetRedisData.GetCount("PassCarCount:passcount_last"); //dataCountInfo.GetPassCarCountDay(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")); lblLastDayOnline.Text = GetRedisData.GetCount("PassCarCount:passcount_online_last"); //dataCountInfo.GetOnlineCarCountDay(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")); int LastWeek = WeekOfYear(DateTime.Now) - 1; lblLastWeek.Text = GetRedisData.GetCount("PassCarCount:passcount_week"); //dataCountInfo.GetPassCarCountWeek(LastWeek.ToString(), DateTime.Now.ToString("yyyy")); lblLastMonth.Text = GetRedisData.GetCount("PassCarCount:passcount_month"); //dataCountInfo.GetPassCarCountMonth(DateTime.Now.ToString("yyyy-MM")); string date = DateTime.Now.ToString("yyyy-MM-dd"); this.ResourceManager1.RegisterAfterClientInitScript("chooseDate('" + date + "')"); this.DataBind(); UserInfo userinfo = Session["Userinfo"] as UserInfo; logManager.InsertLogRunning(userinfo.UserName, GetLangStr("CurrentDataCount14", "访问:") + Request.QueryString["funcname"], userinfo.NowIp, "0"); } }
/// <summary> /// 初始化页面 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> 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; } try { if (!X.IsAjaxRequest) { this.DateStartTime.Value = string.Format("{0:yyyy-MM-dd}", DateTime.Now.AddDays(-1)); this.DateEndTime.Value = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.TimeStart.Text = DateTime.Now.ToString("00:00:01"); this.TimeEnd.Text = DateTime.Now.ToString("23:59:59"); BuildTree(TreePanel1.Root); this.WebChartViewer1.Visible = false; ButPie.Hidden = true; Session["pc_wfdd"] = ""; if (this.CmbCountType.Items.Count > 0) { this.CmbCountType.SelectedIndex = 0; } this.DataBind(); } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("PeccancyCount.aspx-Page_Load", ex.Message + ";" + ex.StackTrace, "Page_Load has an exception"); } }
/// <summary> /// 初始化页面 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> 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) { string type = Request["type"]; if (type != null) { if (type.Equals("full")) { } } BuildTree(TreePanel1.Root); UserInfo userinfo = Session["Userinfo"] as UserInfo; logManager.InsertLogRunning(userinfo.UserName, "访问:BGisBrowse.aspx树获取值", userinfo.NowIp, "0"); } }
/// <summary> /// 初始化页面 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> 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 { StoreQuery.DataSource = GetRedisData.GetData("t_sys_code:240027"); StoreQuery.DataBind(); //this.StoreQuery.DataSource = logManager.GetLogType(SystemID); //this.StoreQuery.DataBind(); //ButCsv.Disabled = true; ButExcel.Disabled = true; DataSetDateTime(); //ButXml.Disabled = true; //ButPrint.Disabled = true; this.DataBind(); TbutQueryClick(null, null); } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("LogBusiness.aspx-Page_Load", ex.Message + ";" + ex.StackTrace, "Page_Load发生异常"); } UserInfo userinfo = Session["Userinfo"] as UserInfo; logManager.InsertLogRunning(userinfo.UserName, "访问:业务日志查询", userinfo.NowIp, "0"); this.DataBind(); } }
/// <summary> /// 初始化页面 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> 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 (!IsPostBack) { if (!X.IsAjaxRequest) { DataSetDateTime(); StoreDataBind(); //BuildTree(TreeStation.Root); TbutQueryClick(null, null); this.DataBind(); UserInfo userinfo = Session["Userinfo"] as UserInfo; logManager.InsertLogRunning(userinfo.UserName, "访问:报警查询", userinfo.NowIp, "0"); } } }
protected void Page_Load(object sender, EventArgs e) { string username = Request.QueryString["username"]; if (!userLogin.CheckLogin(username)) { string js = "alert('" + GetLangStr("FisrtIntoCity27", "您没有登录或操作超时,请重新登录!") + "');window.top.location.href='" + StaticInfo.LoginPage + "'"; System.Web.HttpContext.Current.Response.Write("<script type='text/javascript'>" + js + "</script>"); return; } if (!X.IsAjaxRequest) { this.DataBind(); if (Session["Condition"] != null) { Condition con = Session["Condition"] as Condition; start.InnerText = con.StartTime; end.InnerText = con.EndTime; startdate = con.StartTime; enddate = con.EndTime; cboplate.SetVehicleText(con.Sqjc); if (con.QueryMode.Equals("0")) { pnhphm.Hidden = false; txtplate.Hidden = true; if (con.Hphm.Length < 6) { int length = con.Hphm.Length; for (int i = 0; i < 6 - length; i++) { con.Hphm = con.Hphm + "_"; } } haopai_name1.Value = con.Hphm.Substring(0, 1); if (haopai_name1.Value.Equals("_")) { haopai_name1.Value = ""; } haopai_name2.Value = con.Hphm.Substring(1, 1); if (haopai_name2.Value.Equals("_")) { haopai_name2.Value = ""; } haopai_name3.Value = con.Hphm.Substring(2, 1); if (haopai_name3.Value.Equals("_")) { haopai_name3.Value = ""; } haopai_name4.Value = con.Hphm.Substring(3, 1); if (haopai_name4.Value.Equals("_")) { haopai_name4.Value = ""; } haopai_name5.Value = con.Hphm.Substring(4, 1); if (haopai_name5.Value.Equals("_")) { haopai_name5.Value = ""; } haopai_name6.Value = con.Hphm.Substring(5, 1); if (haopai_name6.Value.Equals("_")) { haopai_name6.Value = ""; } } else { if (!string.IsNullOrEmpty(con.Hphm)) { txtplate.Text = con.Hphm; } } //模糊查询 if (con.QueryMode == "1") { cktype.Checked = false; } else { cktype.Checked = true; } CmbPlateType.Value = con.Hpzl; } else { start.InnerText = DateTime.Now.AddHours(-1).ToString("yyyy-MM-dd HH:mm:ss"); end.InnerText = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); startdate = DateTime.Now.AddHours(-1).ToString("yyyy-MM-dd HH:mm:ss"); enddate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); } DataTable dt1 = GetRedisData.GetData("t_sys_code:140001"); if (dt1 != null) { this.StorePlateType.DataSource = Bll.Common.ChangColName(dt1); this.StorePlateType.DataBind(); } else { this.StorePlateType.DataSource = tgsPproperty.GetPalteType(); this.StorePlateType.DataBind(); } ButQuery_Event(null, null); UserInfo userinfo = Session["Userinfo"] as UserInfo; logManager.InsertLogRunning(userinfo.UserName, GetLangStr("FisrtIntoCity28", "访问:初次入城"), userinfo.NowIp, "0"); } }
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) { Session["flowcaption"] = "流量统计"; Session["flowxlable"] = "小时"; this.WebChartViewer1.Visible = false; string kkid = Session["kkid"] as String; if (!string.IsNullOrEmpty(kkid)) { List <string> countkkid = GetList(kkid); if (countkkid.Count > 0) { DataTable dt = gisShow.GetFlow(countkkid, DateTime.Now.ToString("yyyy-MM-dd"), "0"); this.StoreFlow.RemoveFields(); this.GridFlow.ColumnModel.Columns.Clear(); this.GridFlow.Reconfigure(); for (int i = 0; i < dt.Columns.Count; i++) { RecordField field = new RecordField(dt.Columns[i].ColumnName, RecordFieldType.String); this.StoreFlow.AddField(field); Column col = new Column(); col.Header = dt.Columns[i].ColumnName; if (i == 0) { col.Width = 100; } else { if (i > 10) { col.Width = 38; } else { col.Width = 32; } } col.Sortable = true; col.DataIndex = dt.Columns[i].ColumnName; GridFlow.AddColumn(col); } this.StoreFlow.DataSource = dt; this.StoreFlow.DataBind(); GridFlow.Title = title; Session["Flow"] = dt; } } } }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <returns></returns> protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ParameterCollection para = Store1.AutoLoadParams; if (Session["Screen"] != null) { string screen = Session["Screen"].ToString(); if (screen.Equals("1")) { para.GetParameter("limit").Value = "10"; pageSize = 10; } else if (screen.Equals("2")) { para.GetParameter("limit").Value = "4"; pageSize = 4; } else if (screen.Equals("3")) { para.GetParameter("limit").Value = "3"; } else { para.GetParameter("limit").Value = "3"; } } else { para.GetParameter("limit").Value = "3"; } string username = Request.QueryString["username"]; if (!userLogin.CheckLogin(username)) { string js = "alert('" + GetLangStr("OneLisenceMulCar29", "您没有登录或操作超时,请重新登录!") + "');window.top.location.href='" + StaticInfo.LoginPage + "'"; System.Web.HttpContext.Current.Response.Write("<script type='text/javascript'>" + js + "</script>"); return; } curpage1.Value = "1"; if (!X.IsAjaxRequest) { try { if (Session["Condition"] != null) { ButFirst.Disabled = true; ButLast.Disabled = true; Condition con = Session["Condition"] as Condition; start.InnerText = con.StartTime; end.InnerText = con.EndTime; startdate = con.StartTime; enddate = con.EndTime; cboplate.SetVehicleText(con.Sqjc); txtplate.Text = con.Hphm; } else { start.InnerText = DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); end.InnerText = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); startdate = DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); enddate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); if (!string.IsNullOrEmpty(Request.QueryString["startTime"])) { startdate = Request.QueryString["startTime"]; start.InnerText = startdate; } if (!string.IsNullOrEmpty(Request.QueryString["endTime"])) { enddate = Request.QueryString["endTime"]; end.InnerText = enddate; } if (!string.IsNullOrEmpty(Request.QueryString["hphm"])) { hphm = Request.QueryString["hphm"]; if (!string.IsNullOrEmpty(hphm)) { cboplate.SetVehicleText(hphm.Substring(0, 1)); txtplate.Text = hphm.Substring(1); } } } ButQueryClick(null, null); UserInfo userinfo = Session["Userinfo"] as UserInfo; logManager.InsertLogRunning(userinfo.UserName, GetLangStr("OneLisenceMulCar30", "访问:车辆套牌"), userinfo.NowIp, "0"); } catch (Exception ex) { logManager.InsertLogError("OneLisenceMulCar.aspx-Page_Load", ex.Message + ";" + ex.StackTrace, "Page_Load has an exception"); ILog.WriteErrorLog(ex.Message); } } } }
/// <summary> /// Handles the Load event of the Page control. /// </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("FootHold28", "您没有登录或操作超时,请重新登陆!") + "');window.top.location.href='" + StaticInfo.LoginPage + "'"; System.Web.HttpContext.Current.Response.Write("<script type='text/javascript'>" + js + "</script>"); return; } if (!X.IsAjaxRequest) { this.DataBind(); try { isdefault = true; DataTable dt4 = GetRedisData.GetData("t_sys_code:240025"); //行驶方向 if (dt4 != null) { Dt_xsfx = dt4; } else { Dt_xsfx = bll.GetFxcode(); } Dt_Station = bll.GetStation(); Dt_passcar = GetData(); Dt_result = GetResultData(); DataTable dt1 = GetRedisData.GetData("t_sys_code:140001"); if (dt1 != null) { this.cllx.DataSource = dt1; this.cllx.DataBind(); } startdate = ""; enddate = ""; string hphm, hpzl; if (Session["Condition"] != null) { Condition con = Session["Condition"] as Condition; startdate = con.StartTime; end.InnerText = enddate = con.EndTime; hphm = con.Sqjc + con.Hphm; cboplate.SetVehicleText(hphm.Substring(0, 1)); txtplate.Text = hphm.Substring(1); hpzl = con.Hpzl; } else { //starttime = Request.QueryString["startTime"]; //endtime = Request.QueryString["endTime"]; hphm = Request.QueryString["hphm"]; hpzl = Request.QueryString["hpzl"]; } if (!string.IsNullOrEmpty(hphm) && !string.IsNullOrEmpty(hpzl)) { //start.InnerText = starttime; //end.InnerText = endtime; //startdate = starttime; //enddate = endtime; cboplate.SetVehicleText(hphm.Substring(0, 1)); txtplate.Text = hphm.Substring(1); cbocllx.Value = hpzl; start.InnerText = startdate; end.InnerText = enddate; ButQueryClick(); } } catch { } UserInfo userinfo = Session["Userinfo"] as UserInfo; logManager.InsertLogRunning(userinfo.UserName, GetLangStr("FootHold29", "访问:") + Request.QueryString["funcname"], userinfo.NowIp, "0"); this.DataBind(); } }
/// <summary> /// Handles the Load event of the Page control. /// </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("PathCarQuery33", "您没有登录或操作超时,请重新登录!") + "');window.top.location.href='" + StaticInfo.LoginPage + "'"; System.Web.HttpContext.Current.Response.Write("<script type='text/javascript'>" + js + "</script>"); return; } if (!X.IsAjaxRequest) { this.DataBind(); try { ButPlay.Text = GetLangStr("PathCarQuery34", "播放"); Dt_Station = bll.GetStation(); Dt_passcar = GetData(); DataTable dt1 = GetRedisData.GetData("t_sys_code:240025");// if (dt1 != null) { Dt_xsfx = dt1; } else { Dt_xsfx = bll.GetFxcode(); } DataTable dt2 = GetRedisData.GetData("t_sys_code:140001"); if (dt2 != null) { this.cllx.DataSource = dt2; this.cllx.DataBind(); } string hphm, hpzl; if (Session["Condition"] != null) { Condition con = Session["Condition"] as Condition; startdate = con.StartTime; enddate = con.EndTime; hphm = con.Sqjc + con.Hphm; cboplate.SetVehicleText(hphm.Substring(0, 1)); txtplate.Text = hphm.Substring(1); hpzl = con.Hpzl; } else { startdate = Request.QueryString["startTime"]; enddate = Request.QueryString["endTime"]; hphm = Request.QueryString["hphm"]; hpzl = Request.QueryString["hpzl"]; } if (!string.IsNullOrEmpty(startdate) && !string.IsNullOrEmpty(enddate)) { start.InnerText = startdate; end.InnerText = enddate; } else { startdate = DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); enddate = DateTime.Now.ToString("yyyy-MM-dd 23:59:59"); start.InnerText = startdate; end.InnerText = enddate; } if (!string.IsNullOrEmpty(hphm)) { cboplate.SetVehicleText(hphm.Trim().Substring(0, 1)); txtplate.Text = hphm.Trim().Substring(1); } if (!string.IsNullOrEmpty(hpzl)) { cbocllx.SetValue(hpzl); } if (!string.IsNullOrEmpty(hphm) && !string.IsNullOrEmpty(hpzl)) { ButQueryClick(); } UserInfo userinfo = Session["Userinfo"] as UserInfo; logManager.InsertLogRunning(userinfo.UserName, GetLangStr("PathCarQuery35", "访问:") + Request.QueryString["funcname"], userinfo.NowIp, "0"); } catch (Exception ex) { ILog.WriteErrorLog(ex.Message); logManager.InsertLogError("PathCarQuery.aspx-Page_Load", ex.Message + ";" + ex.StackTrace, "Page_Load has an exception"); } } }
protected void Page_Load(object sender, EventArgs e) { string username = Request.QueryString["username"]; if (!userLogin.CheckLogin(username)) { string js = "alert('" + GetLangStr("CarQuery41", "您没有登录或操作超时,请重新登录!") + "');window.top.location.href='" + StaticInfo.LoginPage + "'"; System.Web.HttpContext.Current.Response.Write("<script type='text/javascript'>" + js + "</script>"); return; } if (!X.IsAjaxRequest) { try { this.ResourceManager1.RegisterAfterClientInitScript("GetScreen();"); DataTable dt1 = GetRedisData.GetData("t_sys_code:140001"); if (dt1 != null) { this.cllx.DataSource = Dt_cllx = Bll.Common.ChangColName(dt1); this.cllx.DataBind(); } else { System.Data.DataSet ds = bll.GetCllx(); if (ds != null && ds.Tables[0].Rows.Count > 0) { this.cllx.DataSource = ds.Tables[0]; this.cllx.DataBind(); Dt_cllx = ds.Tables[0]; } } this.csys.DataSource = GetRedisData.GetData("t_sys_code:240013"); this.csys.DataBind(); Dt_Station = bll.GetStation(); Dt_passcar = GetData(); Dt_result = GetResultData(); start.InnerText = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd HH:mm:ss"); end.InnerText = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); startdate = start.InnerText; enddate = end.InnerText; if (Session["Condition"] != null) { Condition con = Session["Condition"] as Condition; start.InnerText = con.StartTime; end.InnerText = con.EndTime; startdate = con.StartTime; enddate = con.EndTime; cboplate.SetVehicleText(con.Sqjc); txtplate.Text = con.Hphm; cbocllx.SetValue(con.Hpzl); ButQueryClick(); } else { if (!string.IsNullOrEmpty(Request.QueryString["hphm"])) { string hphm = Request.QueryString["hphm"]; if (!string.IsNullOrEmpty(hphm)) { cboplate.SetVehicleText(hphm.Substring(0, 1)); txtplate.Text = hphm.Substring(1, hphm.Length - 1); } } if (!string.IsNullOrEmpty(Request.QueryString["hpzl"])) { string hpzl = Request.QueryString["hpzl"]; cbocllx.Value = hpzl; } if (!string.IsNullOrEmpty(Request.QueryString["startTime"])) { startdate = Request.QueryString["startTime"]; start.InnerText = startdate; } if (!string.IsNullOrEmpty(Request.QueryString["endTime"])) { enddate = Request.QueryString["endTime"]; end.InnerText = enddate; } } } catch { } UserInfo userinfo = Session["Userinfo"] as UserInfo; logManager.InsertLogRunning(userinfo.UserName, GetLangStr("CarQuery36", "访问:") + Request.QueryString["funcname"], userinfo.NowIp, "0"); } this.DataBind(); }