/// <summary> /// 查询连接数据 /// </summary> /// <param name="where"></param> private void LedDataBind(string where) { try { DataTable dt = dtname = Bll.Common.ChangColName(deviceManager.GetCctvSetting("*", where)); //PagingToolbar1.PageSize = 50; StoreDeviceManager.DataSource = dt; StoreDeviceManager.DataBind(); Session["datatable"] = dt; if (dt != null && dt.Rows.Count > 0) { ToolExport.Disabled = false; } else { ToolExport.Disabled = true; } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("CCTVStationManager.aspx-LedDataBind", ex.Message + ";" + ex.StackTrace, "LedDataBind has an exception"); } }
/// <summary> /// 获取重点车辆数据 /// </summary> /// <param name="where"></param> private void GridDataBind(string where) { try { DataTable dt = serviceManager.GetVehiclese(where); StoreDeviceManager.DataSource = dt; StoreDeviceManager.DataBind(); Session["datatable"] = dt; if (dt != null && dt.Rows.Count > 0) { SelectFirst(dt.Rows[0]); ButExcel.Disabled = false; } else { ButExcel.Disabled = true; } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("ImportantManager.aspx-GridDataBind", ex.Message + ";" + ex.StackTrace, "GridDataBind has an exception"); } }
/// <summary> /// 加载设备信息 /// </summary> /// <param name="where"></param> private void LedDataBind(string where) { try { PagingToolbar1.PageSize = 50; DataTable dt = deviceManager.GetTGSSetting("*", where); StoreDeviceManager.DataSource = dt; StoreDeviceManager.DataBind(); dtsbmc = dt; Session["datatable"] = dt; if (dt != null && dt.Rows.Count > 0) { ButExcel.Disabled = false; //ButPrint.Disabled = false; } else { ButExcel.Disabled = true; } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("TGSStationManager.aspx-LedDataBind", ex.Message + ";" + ex.StackTrace, "LedDataBind has an exception"); } }
/// <summary> ///初始化绑定数据 /// </summary> /// <param name="where"></param> private void GridDataBind(string where) { try { PagingToolbar1.PageSize = 10; DataTable dt = deviceManager.GetTongJi(where); StoreDeviceManager.DataSource = dt; StoreDeviceManager.DataBind(); Session["datatable"] = dt; if (dt != null && dt.Rows.Count > 0) { SelectFirst(dt.Rows[0]); ToolExport.Disabled = false; Button2.Disabled = false; } else { Button2.Disabled = true; } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("DeviceStatistics.aspx-GridDataBind", ex.Message + ";" + ex.StackTrace, "GridDataBind has an exception"); } }
/// <summary> /// 刷新数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void MyData_Refresh(object sender, DirectEventArgs e) { try { DataTable dt = deviceManager.GetServer(" 1=1 "); StoreDeviceManager.DataSource = dt; StoreDeviceManager.DataBind(); Session["datatable"] = dt; if (dt != null) { if (dt.Rows.Count > 0) { ButExcel.Disabled = false; //ButPrint.Disabled = false; } } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("ServerManager.aspx-MyData_Refresh", ex.Message + ";" + ex.StackTrace, "MyData_Refresh has an exception"); } }
/// <summary> /// 加载设备信息 /// </summary> /// <param name="where"></param> private void LedDataBind(string where) { try { DataTable dt = deviceManager.GetDevice(where); StoreDeviceManager.DataSource = dt; StoreDeviceManager.DataBind(); Session["datatable"] = dt; if (dt != null) { if (dt.Rows.Count > 0) { ButExcel.Disabled = false; // ButPrint.Disabled = false; } else { ButExcel.Disabled = true; } } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("DeviceManager.aspx-LedDataBind", ex.Message + ";" + ex.StackTrace, "LedDataBind has an exception"); } }
public void updatedeviceqw() { try { string id = yuweiId; string decice_id = this.hidder1.Value.ToString(); string kssj = DateTime.Parse(lrsj).ToString("yyyy-MM-dd HH:mm:ss"); string jssj = DateTime.Parse(shsj).ToString("yyyy-MM-dd HH:mm:ss"); Hashtable hs = new Hashtable(); hs.Add("id", id); hs.Add("openration_people", this.txt_upde_lrpeople.Text.ToString()); hs.Add("openration_time", kssj); hs.Add("openration_event", this.txt_upde_lrshuoming.Text.ToString()); hs.Add("openration_type", this.com_upte_lrtype.Value); hs.Add("openration_unit", this.com_upte_lrdanwei.Value); hs.Add("openration_auditor", this.txt_upde_shpeople.Text.ToString()); hs.Add("openration_opinion", this.txt_upde_shyijian.Text.ToString()); hs.Add("openration_revtime", jssj); if (deviceManager.uptateOperation(hs) > 0) { StoreDeviceManager.DataSource = (DataTable)Session["datatable"]; StoreDeviceManager.DataBind(); DataTable da = deviceManager.GetOperation(" 1=1 AND device_id='" + decice_id + "' "); SroPenation.DataSource = da; SroPenation.DataBind(); Window3.Hide(); string ywfss = com_upte_lrtype.SelectedItem.Text; string sqdws = com_upte_lrdanwei.SelectedItem.Text; string sqrs = txt_upde_lrpeople.Text; string lrsjs = start1time; string lrsms = txt_upde_lrshuoming.Text; string shrs = txt_upde_shpeople.Text; string shsjs = end1time; string shyjs = txt_upde_shyijian.Text; string lbname = ""; lbname += Bll.Common.AssembleRunLog(ywfs, ywfss, GetLangStr("DeviceOperation58", "运维方式"), "1"); lbname += Bll.Common.AssembleRunLog(sqdw, sqdws, GetLangStr("DeviceOperation28", "申请单位"), "1"); lbname += Bll.Common.AssembleRunLog(sqr, sqrs, GetLangStr("DeviceOperation27", "申请人"), "1"); lbname += Bll.Common.AssembleRunLog(lrsj, lrsjs, GetLangStr("DeviceOperation29", "录入时间"), "1"); lbname += Bll.Common.AssembleRunLog(lrsm, lrsms, GetLangStr("DeviceOperation39", "录入说明"), "1"); lbname += Bll.Common.AssembleRunLog(shr, shrs, GetLangStr("DeviceOperation40", "审核人"), "1"); lbname += Bll.Common.AssembleRunLog(shsj, shsjs, GetLangStr("DeviceOperation41", "审核时间"), "1"); lbname += Bll.Common.AssembleRunLog(shyj, shyjs, GetLangStr("DeviceOperation42", "审核意见"), "1"); DataRow[] dr = dtname.Select("col0='" + sbid + "'"); string sbne = dr[0]["col2"].ToString(); logManager.InsertLogRunning(uName, GetLangStr("DeviceOperation67", "修改;[") + sbne + "]" + lbname, nowIp, "2"); Notice(GetLangStr("DeviceOperation70", "信息提示"), GetLangStr("DeviceOperation75", "修改成功")); } qingkongupdate(); } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("DeviceOperation.aspx-updatedeviceqw", ex.Message + ";" + ex.StackTrace, "updatedeviceqw has an exception"); } }
public void update(string code) { try { //页面没数据 StoreDeviceManager.DataSource = (DataTable)Session["datatable"]; StoreDeviceManager.DataBind(); SroPenation.DataSource = (DataTable)Session["yunweitable"]; SroPenation.DataBind(); DataTable da = deviceManager.GetSelectOperation(" id='" + code + "'"); this.com_upte_lrtype.Value = da.Rows[0]["col5"].ToString(); this.com_upte_lrdanwei.Value = da.Rows[0]["col6"].ToString(); this.txt_upde_lrpeople.Text = da.Rows[0]["col2"].ToString(); start1time = da.Rows[0]["col3"].ToString(); end1time = da.Rows[0]["col9"].ToString(); string js = "setTime('" + start1time + "','" + end1time + "');"; this.ResourceManager1.RegisterAfterClientInitScript(js); //string[] lurutiem = (da.Rows[0]["col3"].ToString()).Split(' '); //this.date_upde_lrdate.Text = lurutiem[0].ToString(); //this.time_upde_lrtime.Text = lurutiem[1].ToString(); this.txt_upde_lrshuoming.Text = da.Rows[0]["col4"].ToString(); this.txt_upde_shpeople.Text = da.Rows[0]["col7"].ToString(); // string[] shtiem = (da.Rows[0]["col9"].ToString()).Split(' '); //this.date_upde_shdate.Text = shtiem[0].ToString(); //this.time_upde_shtime.Text = shtiem[1].ToString(); this.txt_upde_shyijian.Text = da.Rows[0]["col8"].ToString(); this.hidder1.Value = da.Rows[0]["col1"].ToString(); yuweiId = code; DataRow[] dt = dtyw.Select("col0='" + da.Rows[0]["col5"].ToString() + "'"); ywfs = dt[0]["col1"].ToString(); DataRow[] dt1 = dtyw.Select("col0='" + da.Rows[0]["col6"].ToString() + "'"); sqdw = dt1[0]["col1"].ToString(); sqr = txt_upde_lrpeople.Text; lrsj = start1time; lrsm = txt_upde_lrshuoming.Text; shr = txt_upde_shpeople.Text; shsj = end1time; shyj = txt_upde_shyijian.Text; Window3.Show(); } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("DeviceOperation.aspx-update", ex.Message + ";" + ex.StackTrace, "update has an exception"); } }
/// <summary> /// 初始化绑定数据 /// </summary> /// <param name="where"></param> /// <returns></returns> private void GridDataBind(string where, int pageIndex) { try { PagingToolbar1.PageSize = 5; PagingToolbar1.PageIndex = pageIndex; DataTable dt = deviceManager.GetDeviceByMore(where); string ii = dt.Rows[0]["col0"].ToString(); sbid = ii; StoreDeviceManager.DataSource = dt; StoreDeviceManager.DataBind(); Session["datatable"] = dt; if (dt.Rows.Count <= 0) { ToolExport.Disabled = true; Button2.Disabled = true; return; } if (Session["yunweitable"] != null) { DataTable da = Session["yunweitable"] as DataTable; if (da != null) { if (da.Rows.Count > 0) { SelectFirst(dt.Rows[0]); ToolExport.Disabled = false; Button2.Disabled = false; } else { ToolExport.Disabled = true; Button2.Disabled = true; } } } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("DeviceOperation.aspx-GridDataBind", ex.Message + ";" + ex.StackTrace, "GridDataBind has an exception"); } }