/// <summary> /// 获取低电量信息 /// </summary> /// <param name="CodeSenderStateID">发码器状态,4:低电量</param> /// <param name="dv"></param> /// <param name="strCounts"></param> /// <returns></returns> public bool N_SelectAlarmElectricity(int CodeSenderStateID, int intCsTypeID, DataGridViewKJ128 dv, out string strCounts) { using (ds = new DataSet()) { dv.Columns.Clear(); ds = rtaedal.N_GetAlarmElectricity(CodeSenderStateID, intCsTypeID); if (ds != null && ds.Tables.Count > 0) { if (ds.Tables[0].Rows.Count > 0) { strCounts = ds.Tables[0].Rows.Count.ToString(); } else { strCounts = "0"; } ds.Tables[0].Columns[0].ColumnName = HardwareName.Value(CorpsName.CodeSenderAddress); dv.DataSource = ds.Tables[0]; } else { strCounts = "0"; } } return(true); }
//函数 #region 页面加载 public FrmHisInOutStationHead() { InitializeComponent(); label8.Text = HardwareName.Value(CorpsName.CodeSenderAddress) + ":"; label4.Text = HardwareName.Value(CorpsName.StationSplace) + ":"; label5.Text = HardwareName.Value(CorpsName.StaHeadSplace) + ":"; dtEndTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); dtStartTime.Text = DateTime.Today.ToString(); #region 加载部门, 工种, 证书, 职务, 职务等级 信息 if (!lhsh.LoadInfo(treeInfo, cmbWorkType, cmbCerType, cmbDutyName, cmbDutyClass, 1)) { MessageBox.Show("对不起, 基本数据加载失败!"); return; } #endregion #region 加载分站信息 lhab.LoadInfo(cmb_Station, cmb_StaHead, false); #endregion treeInfo.ExpandAll(); treeInfo.SelectedNode = treeInfo.Nodes[0]; cbPSize.SelectedIndex = 0; // 加载设备类型,生产厂家 DeptBLL deptbll = new DeptBLL(); deptbll.getEquTYpeCmb(cmbEquType); // 设备类型 deptbll.getEquFactoryCmb(cmbFactory); // 生产厂家 }
private void BandingDataGrid(string condition) { DataTable dt = bll.GetHisPathAlertInfo(condition); this.dbgvMain.DataSource = dt; if (dt != null && dt.Rows.Count > 0) { dbgvMain.Columns[8].HeaderText = HardwareName.Value(CorpsName.StationSplace); dbgvMain.Columns[9].HeaderText = HardwareName.Value(CorpsName.StaHeadSplace); dbgvMain.Columns["EmpID"].Visible = false; cpnlTop.CaptionTitle = "历史路径报警信息:\t共" + dt.Rows.Count.ToString() + "条信息"; } else { cpnlTop.CaptionTitle = "历史路径报警信息:\t共0条信息"; } //this.listBox1.Items.Clear(); //foreach (DataRow dr in dt.Rows) //{ // this.listBox1.Items.Add(dr["AlertBeginTime"].ToString() + "--" + dr["AlertEndTime"].ToString()); //} }
/// <summary> /// 查询实时接收器信息 /// </summary> /// <param name="strState">分站编号</param> /// <param name="dv"></param> /// <returns></returns> public bool N_SearchStaHeadBreakInfo(string strState, DataGridViewKJ128 dv) { using (ds = new DataSet()) { dv.Columns.Clear(); ds = this.N_GetStaHeadBreakInfo(strState); if (ds == null) { return(false); } ds.Tables[0].Columns[0].ColumnName = HardwareName.Value(CorpsName.StationAddress); ds.Tables[0].Columns[1].ColumnName = HardwareName.Value(CorpsName.StationSplace); ds.Tables[0].Columns[2].ColumnName = HardwareName.Value(CorpsName.StaHeadAddress); ds.Tables[0].Columns[3].ColumnName = HardwareName.Value(CorpsName.StaHeadSplace); ds.Tables[0].Columns[4].ColumnName = HardwareName.Value(CorpsName.StaHead) + "联系电话"; ds.Tables[0].Columns[5].ColumnName = HardwareName.Value(CorpsName.StaHead) + "类型"; ds.Tables[0].Columns[6].ColumnName = HardwareName.Value(CorpsName.StaHead) + "状态"; ds.Tables[0].Columns[7].ColumnName = HardwareName.Value(CorpsName.StaHead) + "故障时间"; dv.DataSource = ds.Tables[0].DefaultView; dv.Columns[0].FillWeight = 40; dv.Columns[2].FillWeight = 55; dv.Columns[3].FillWeight = 150; dv.Columns[6].FillWeight = 70; dv.Columns[7].FillWeight = 120; dv.Columns[7].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm:ss"; } return(true); }
//#region 获取 发码器状态 基本信息 ///// <summary> ///// 获取 发码器状态 基本信息 ///// </summary> ///// <returns></returns> //private DataSet N_GetCsTypeName() //{ // strSql = " Select EnumID,Title From EnumTable Where FunID=2 "; // return dbacc.GetDataSet(strSql); //} //#endregion #endregion #region [ 方法: 发码器查询 ] /// <summary> /// 发码器查询 /// </summary> /// <param name="strCodeSender">发码器编号</param> /// <param name="strCodeSenderStateID">发码器状态ID</param> /// <param name="dv">要绑定的DataGridView</param> /// <returns>true 成功,false 不成功</returns> public bool N_SearchCodeInfo(string strCodeSender, string strCodeSenderStateID, DataGridViewKJ128 dv, out string strCounts) { using (ds = new DataSet()) { dv.Columns.Clear(); ds = ccsdal.N_SearchCodeInfo(strCodeSender, strCodeSenderStateID); dv.DataSource = ds.Tables[0].DefaultView; dv.Columns[0].FillWeight = 40; dv.Columns[1].FillWeight = 40; dv.Columns[2].FillWeight = 40; if (ds != null && ds.Tables.Count > 0) { if (ds.Tables[0].Rows.Count > 0) { strCounts = ds.Tables[0].Rows.Count.ToString(); } else { strCounts = "0"; } } else { strCounts = "0"; } dv.Columns[1].HeaderText = HardwareName.Value(CorpsName.CodeSender) + "状态"; } return(true); }
/* * 事件 */ #region [ 事件: 发码器查询_Click事件 ] private void btnQuery1_Click(object sender, EventArgs e) { string strCounts; ccsibll.N_SearchCodeInfo(txtCodeSender1.Text.Trim(), cmbCodeSenderStateID.SelectedValue.ToString(), dgvCode, out strCounts); buttonCaptionPanel1.CaptionTitle = HardwareName.Value(CorpsName.CodeSender) + "信息:" + "\t共 " + strCounts + " 个" + HardwareName.Value(CorpsName.CodeSender); }
private void btnQuery2_Click(object sender, EventArgs e) { string strCounts; ccsibll.N_SearchCodeSetInfo(txtCodeSender2.Text.Trim(), txtName.Text.Trim(), rbEmp.Checked || rbEqu.Checked ? rbEmp.Checked ? 0 : 1 : 2, dgvCodeSender, out strCounts); buttonCaptionPanel3.CaptionTitle = HardwareName.Value(CorpsName.CodeSender) + "配置信息:" + "\t共 " + strCounts + " 个" + HardwareName.Value(CorpsName.CodeSender); }
public bool GetHisBadStaHeadInfo(string strStartTime, string strEndTime, string strStationAddress, DataGridViewKJ128 dv) { using (ds = new DataSet()) { try { dv.Columns.Clear(); ds = hbdal.GetHisBadStaHeadInfo(strStartTime, strEndTime, strStationAddress); if (ds != null && ds.Tables.Count >= 0) { dv.DataSource = ds.Tables[0]; dv.Columns[0].HeaderText = HardwareName.Value(CorpsName.StationAddress); dv.Columns[1].HeaderText = HardwareName.Value(CorpsName.StaHeadAddress); } } catch (Exception) { dv.DataSource = null; return(false); } } return(true); }
public FrmRealTimeAlarmPath() { InitializeComponent(); dgvMain.Columns["StationPlace"].HeaderText = HardwareName.Value(CorpsName.StationSplace); dgvMain.Columns["StationHeadPlace"].HeaderText = HardwareName.Value(CorpsName.StaHeadSplace); }
public FrmRealTimeDirectional(bool bl, string strDir, int intDirectional, string strStaAddress) { InitializeComponent(); label3.Text = HardwareName.Value(CorpsName.CodeSenderAddress) + ":"; label2.Text = HardwareName.Value(CorpsName.StationAddress) + ":"; label4.Text = HardwareName.Value(CorpsName.StaHeadAddress) + ":"; lhishbll.LoadInfo(cmbStation, cmbStaHead, false); rtdbll.N_LoadDept(tvDept); tvDept.SelectedNode = tvDept.Nodes[0]; #region 为主界面中方向性查询赋值 if (bl) { if (intDirectional == 0) //员工 { rbtnEmp.Checked = true; } else if (intDirectional == 1) //设备 { rbtnEqu.Checked = true; } txtDirectional.Text = strDir; if (rtdbll.SelectStationPlace(strStaAddress) != null) { cmbStation.Text = rtdbll.SelectStationPlace(strStaAddress); } } #endregion }
public FrmHisInOutMine() { InitializeComponent(); dtEndTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); dtStartTime.Text = DateTime.Today.ToString("yyyy-MM-dd HH:mm:ss"); #region 加载部门, 工种, 证书, 职务, 职务等级 信息 if (!lhmb.LoadInfo(treeInfo, cmbWorkType, null, cmbDutyName, null, 1)) { MessageBox.Show("对不起, 基本数据加载失败!"); return; } #endregion treeInfo.ExpandAll(); treeInfo.SelectedNode = treeInfo.Nodes[0]; // 加载设备类型,生产厂家 DeptBLL deptbll = new DeptBLL(); deptbll.getEquTYpeCmb(cmbEquType); // 设备类型 deptbll.getEquFactoryCmb(cmbFactory); // 生产厂家 label8.Text = HardwareName.Value(CorpsName.CodeSenderAddress) + ":"; dgValue.Columns[0].HeaderText = HardwareName.Value(CorpsName.CodeSenderAddress); this.SelectInfo(); }
private void FrmHistoryInOutAntenna_Load(object sender, EventArgs e) { label10.Text = HardwareName.Value(CorpsName.CodeSenderAddress); label3.Text = HardwareName.Value(CorpsName.StationSplace); label5.Text = HardwareName.Value(CorpsName.StaHeadSplace); rbNotCode.Text = "未登记的" + HardwareName.Value(CorpsName.CodeSender); btnSearch_Click(null, null); }
public void N_SelectRTDirectional(string strDept, string strName, string strCardAddress, string strStation, string strStaHead, bool blIsEmp, string strDirectional, DataGridViewKJ128 dv, out string strCounts) { using (ds = new DataSet()) { dv.Columns.Clear(); ds = rtddal.N_GetRTDirectional(strDept, strName, strCardAddress, strStation, strStaHead, blIsEmp, strDirectional); ds.Tables[0].Columns[0].ColumnName = HardwareName.Value(CorpsName.CodeSenderAddress); ds.Tables[0].Columns[3].ColumnName = HardwareName.Value(CorpsName.StationAddress); ds.Tables[0].Columns[4].ColumnName = HardwareName.Value(CorpsName.StaHeadAddress); ds.Tables[0].Columns[6].ColumnName = HardwareName.Value(CorpsName.Inspect); if (ds != null && ds.Tables.Count > 0) { //ds.Tables[0].Columns[0].ColumnName = HardwareName.Value(CorpsName.CodeSenderAddress); //ds.Tables[0].Columns[3].ColumnName = HardwareName.Value(CorpsName.StationAddress); //ds.Tables[0].Columns[4].ColumnName = HardwareName.Value(CorpsName.StaHeadAddress); //ds.Tables[0].Columns[6].ColumnName = HardwareName.Value(CorpsName.Inspect); dv.DataSource = ds.Tables[0].DefaultView; dv.Columns[7].Visible = false; dv.Columns[0].FillWeight = 50; dv.Columns[1].FillWeight = 60; dv.Columns[2].FillWeight = 60; dv.Columns[3].FillWeight = 45; dv.Columns[4].FillWeight = 45; dv.Columns[5].FillWeight = 120; dv.Columns[6].FillWeight = 85; //将监测时间精确到秒 dv.Columns[6].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm:ss"; if (ds != null && ds.Tables.Count > 0) { if (ds.Tables[0].Rows.Count > 0) { strCounts = ds.Tables[0].Rows.Count.ToString(); } else { strCounts = "0"; } } else { strCounts = "0"; } } else { dv.DataSource = null; strCounts = "0"; } } }
public DataSet GetOverTimeSet(int pageIndex, int pageSize, string where) { DataSet ds = htdal.GetOverTimeSet(pageIndex, pageSize, where); if (ds != null && ds.Tables.Count > 0) { ds.Tables[0].Columns[0].ColumnName = HardwareName.Value(CorpsName.CodeSenderAddress); } return(ds); }
public DataSet GetHisInOutMineSet(string where) { DataSet ds = li.GetHisInOutMineSet(where); if (ds != null && ds.Tables.Count > 0) { ds.Tables[0].Columns[0].ColumnName = HardwareName.Value(CorpsName.CodeSenderAddress); } return(ds); }
/* * 事件 */ #region [ 事件: 窗体加载 ] private void RealTimeInOutAntennaInfo_Load(object sender, EventArgs e) { this.SelectInfo(); sxpPanel1.Caption = "进入" + HardwareName.Value(CorpsName.StaHead) + "时间"; label3.Text = HardwareName.Value(CorpsName.CodeSenderAddress); label4.Text = HardwareName.Value(CorpsName.StationSplace); label5.Text = HardwareName.Value(CorpsName.StaHeadSplace); rbNotCode.Text = "未登记的" + HardwareName.Value(CorpsName.CodeSender); }
//KJ128N_CodeSender_Set_Table #region 加载发码器配置信息 public DataSet N_getKJ128N_CodeSender_Set_Table(int pageIndex, int pageSize, string strWhere) { DataSet ds = csdal.getKJ128N_CodeSender_Set_Table(pageIndex, pageSize, strWhere); if (ds.Tables != null && ds.Tables.Count > 0) { ds.Tables[0].Columns["发码器地址"].ColumnName = HardwareName.Value(CorpsName.CodeSenderAddress); } return(ds); }
public FrmRealTimeInWellInfo(bool bl, string str) { InitializeComponent(); Init(); blIsAlarm = bl; tvDept.SelectedNode = tvDept.Nodes[0]; tvDept.ExpandAll(); strDeptID = str; label3.Text = HardwareName.Value(CorpsName.CodeSenderAddress) + ":"; }
public FrmStatMonthEmpInMine() { InitializeComponent(); date = DateTime.Now.Year.ToString(); BindCmd(); label4.Text = HardwareName.Value(CorpsName.CodeSenderAddress) + ":"; SelectInfo(1); }
public FrmHisStationBreak(int intBreak) { InitializeComponent(); label10.Text = HardwareName.Value(CorpsName.StationSplace) + ":"; dtEndTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); dtStartTime.Text = DateTime.Today.ToString(); this.intBreak = intBreak; label10.Text = HardwareName.Value(CorpsName.StationSplace); }
void BindDataGridView() { //DataSet ds = hmBLL.HolidayManage_Query(Convert.ToInt32(lblPageIndex.Text.Trim()), Convert.ToInt32(cbRowsSet.SelectedValue.ToString()), GetWhere()); DataSet ds = new DataSet(); if (ds != null && ds.Tables.Count > 0) { //更改名称 发码器->发码器编号 ds.Tables[0].Columns[1].ColumnName = HardwareName.Value(CorpsName.CodeSenderAddress); dgrd.AutoGenerateColumns = true; dgrd.DataSource = ds.Tables[0].DefaultView; dgrd.Columns[2].Visible = false; dgrd.Columns[5].Visible = false; dgrd.Columns[0].DisplayIndex = 8; dgrd.Columns[1].DisplayIndex = 8; btnRowsCount.CaptionTitle = "有" + ds.Tables[1].Rows[0][0].ToString() + "条记录"; int intPageCount = Convert.ToInt32(ds.Tables[1].Rows[0][0].ToString()) / Convert.ToInt32(cbRowsSet.SelectedValue.ToString()); if (Convert.ToInt32(ds.Tables[1].Rows[0][0].ToString()) % Convert.ToInt32(cbRowsSet.SelectedValue.ToString()) != 0) { intPageCount++; } if (intPageCount == 0) { intPageCount++; } if (lblPageIndex.Text == "1") { btnpreview.Enabled = false; } else { btnpreview.Enabled = true; } if (lblPageIndex.Text.ToString() == intPageCount.ToString()) { btnNext.Enabled = false; } else { btnNext.Enabled = true; } lblPageCount.Text = intPageCount.ToString(); btnCurrentPageIndex.CaptionTitle = lblPageIndex.Text + "/" + intPageCount.ToString(); } }
public RealTimeMonitorInfo(string strTempCodeAddress) { if (strTempCodeAddress != "") { strCodeSenderAddress = strTempCodeAddress; } InitializeComponent(); label3.Text = HardwareName.Value(CorpsName.CodeSenderAddress) + ":"; Init(); }
public bool N_SearchRTInOutAntennaInfo( string strStartTime, string strEndTime, string strCard, string strStationAddress, string strStationHeadAddress, int intUserType, DataGridViewKJ128 dv, out string strCounts) { if (DateTime.Compare(DateTime.Parse(strStartTime), DateTime.Parse(strEndTime)) > 0) { MessageBox.Show("对不起, 开始时间不能大于结束时间!"); strCounts = "-1"; return(false); } using (ds = new DataSet()) { dv.Columns.Clear(); ds = lrtodal.N_SearchRTInOutAntennaInfo(strStartTime, strEndTime, strCard, strStationAddress, strStationHeadAddress, intUserType); dv.DataSource = ds.Tables[0]; if (ds != null && ds.Tables.Count > 0) { dv.Columns[3].FillWeight = 150; dv.Columns[0].HeaderText = HardwareName.Value(CorpsName.CodeSenderAddress); dv.Columns[1].HeaderText = HardwareName.Value(CorpsName.StationAddress); dv.Columns[2].HeaderText = HardwareName.Value(CorpsName.StaHeadAddress); dv.Columns[3].HeaderText = HardwareName.Value(CorpsName.StaHead) + "监测时间"; //将监测时间精确到秒 dv.Columns[3].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm:ss"; if (ds.Tables[0].Rows.Count > 0) { strCounts = ds.Tables[0].Rows.Count.ToString(); } else { strCounts = "0"; } } else { strCounts = "0"; } } return(true); }
/// <summary> /// 查询历史超时记录 /// </summary> /// <param name="strStartTime">开始时间</param> /// <param name="strEndTime">结束时间</param> /// <param name="strCard">发码器</param> /// <param name="dv">所要绑定的 DataGridView</param> /// <returns></returns> public bool SearchHisTimeOut( string strStartTime, string strEndTime, string strCard, DataGridViewKJ128 dv) { if (DateTime.Compare(DateTime.Parse(strStartTime), DateTime.Parse(strEndTime)) > 0) { MessageBox.Show("对不起, 开始时间不能大于结束时间!"); return(false); } strSql = " Select " + " Hi.CodeSenderAddress As " + HardwareName.Value(CorpsName.CodeSender) + ", " + " Ei.EmpName As 名称, " + " Di.DeptName As 部门, " + " Hi.InMineTime As 下井时间, " + " Hi.DelayedStartTime As 超时开始时间, " + " Hi.DelayedEndTime As 超时结束时间, " + " Hi.DelayedTime As 超时持续时间 " + " From His_OverTimeAlarm As Hi " + " Left Join Emp_Info As Ei On Ei.EmpID = Hi.UserID " + " Left Join Emp_NowCompany As En On En.EmpID = Ei.EmpID " + " Left Join Dept_Info As Di On Di.DeptID = En.DeptID " + " Where Hi.CsTypeID = 1 And Hi.InMineTime >= '" + strStartTime + "' And Hi.InMineTime <= '" + strEndTime + "' "; if (!(strCard.Equals("") | strCard.Equals(null))) { strSql += " And Hi.CodeSenderAddress = " + strCard; } strSql += " Union " + " Select " + " Hi.CodeSenderAddress As " + HardwareName.Value(CorpsName.CodeSender) + ", " + " Eb.EquName As 名称, " + " Di.DeptName As 部门, " + " Hi.InMineTime As 下井时间, " + " Hi.DelayedStartTime As 超时开始时间, " + " Hi.DelayedEndTime As 超时结束时间, " + " Hi.DelayedTime As 超时持续时间 " + " From His_OverTimeAlarm As Hi " + " Left Join Equ_BaseInfo As Eb On Eb.EquID = Hi.UserID " + " Left Join Dept_Info As Di On Di.DeptID = Eb.DeptID " + " Where Hi.CsTypeID = 2 And Hi.InMineTime >= '" + strStartTime + "' And Hi.InMineTime <= '" + strEndTime + "' "; if (!(strCard.Equals("") | strCard.Equals(null))) { strSql += " And Hi.CodeSenderAddress = " + strCard; } return(true); }
public DataSet GetHisInTerInfoSet(int pageIndex, int pageSize, string where, bool blIsEmp) { DataSet ds = hi.GetHisInTerInfoSet(pageIndex, pageSize, where, blIsEmp); if (ds != null && ds.Tables.Count > 0) { ds.Tables[0].Columns[0].ColumnName = HardwareName.Value(CorpsName.CodeSenderAddress); ds.Tables[0].Columns["进入区域时间"].ColumnName = HardwareName.Value(CorpsName.InTerritorialTime); ds.Tables[0].Columns["离开区域时间"].ColumnName = HardwareName.Value(CorpsName.OutTerritorialTime); ds.Tables[0].Columns["持续时长"].ColumnName = HardwareName.Value(CorpsName.StandingTime); } return(ds); }
public DataSet GetHisInMineSet(int pageIndex, int pageSize, string where) { DataSet ds = lim.GetHisInMineSet(pageIndex, pageSize, where); if (ds != null && ds.Tables.Count > 0) { ds.Tables[0].Columns[0].ColumnName = HardwareName.Value(CorpsName.CodeSenderAddress); ds.Tables[0].Columns["下井时间"].ColumnName = HardwareName.Value(CorpsName.InWellTime); ds.Tables[0].Columns["上井时间"].ColumnName = HardwareName.Value(CorpsName.OutWellTime); ds.Tables[0].Columns["井下时长"].ColumnName = HardwareName.Value(CorpsName.StandingWellTime); } return(ds); }
public void BindDataGridView() { if (txtBlockIDStation.Text != "") { try { int.Parse(txtBlockIDStation.Text); } catch (Exception ex) { MessageBox.Show("标识卡编号只能为数字!"); return; } } int intPageSizedll = int.Parse(ddlPageSize.SelectedValue.ToString().ToString()); DataSet ds = swtsBLL.Query_SpecialWorkTypeTerrialSet(intPageIndex, intPageSizedll, GetWhere(), out strErr); if (ds != null) { dgrd.DataSource = ds.Tables[0]; if (ds.Tables[0] != null) { dgrd.Columns[3].HeaderText = HardwareName.Value(CorpsName.CodeSenderAddress); dgrd.Columns[2].Visible = false; dgrd.Columns[0].DisplayIndex = 8; dgrd.Columns[1].DisplayIndex = 8; } int intPageSum = int.Parse(ds.Tables[1].Rows[0][0].ToString()); if (intPageSum % intPageSizedll == 0) { intPageCountShow = intPageSum / intPageSizedll; } else { intPageCountShow = intPageSum / intPageSizedll + 1; } if (intPageCountShow == 0) { intPageCountShow = 1; } PanelPageIndex.CaptionTitle = "第" + intPageIndex.ToString() + "页"; PanelPageCount.CaptionTitle = "共" + intPageCountShow.ToString() + "页"; PanelRowsCount.CaptionTitle = "共" + intPageSum.ToString() + "条"; } }
public FrmConCodeSenderInfo() { InitializeComponent(); labelTransparent2.Text = HardwareName.Value(CorpsName.CodeSenderAddress) + ":"; labelTransparent3.Text = HardwareName.Value(CorpsName.CodeSenderAddress) + ":"; labelTransparent5.Text = HardwareName.Value(CorpsName.CodeSender) + "状态:"; dgvCode.Columns[1].HeaderText = HardwareName.Value(CorpsName.CodeSender) + "状态"; ccsibll.N_LoadInfo(cmbCodeSenderStateID); //加载发码器状态 btnQuery1_Click(null, null); btnQuery2_Click(null, null); }
public bool GetRTEmpHelpInfo(string strBeginTime, string strEndTime, string strCodeSenderAddress, string strSatationAddress, string strStaHeadAddress, string strEmpName, string strDeptName, string strDutyName, string strWtName, string strMeasure, DataGridViewKJ128 dgv) { try { using (ds = new DataSet()) { ds = dal.SelectRealTimeEmpHelpInfo(strBeginTime, strEndTime, strCodeSenderAddress, strSatationAddress, strStaHeadAddress, strEmpName, strDeptName, strDutyName, strWtName, strMeasure); if (ds != null && ds.Tables.Count > 0) { dgv.Columns.Clear(); dgv.DataSource = ds.Tables[0]; AddColumns(dgv); dgv.Columns[0].HeaderText = HardwareName.Value(CorpsName.StationAddress); dgv.Columns[1].HeaderText = HardwareName.Value(CorpsName.StationSplace); dgv.Columns[2].HeaderText = HardwareName.Value(CorpsName.StaHeadAddress); dgv.Columns[3].HeaderText = HardwareName.Value(CorpsName.StaHeadSplace); dgv.Columns[4].HeaderText = HardwareName.Value(CorpsName.CodeSenderAddress); dgv.Columns[0].Width = 50; dgv.Columns[2].Width = 50; dgv.Columns[4].Width = 50; dgv.Columns[5].Width = 70; dgv.Columns[6].Width = 70; dgv.Columns[7].Width = 70; dgv.Columns[8].Width = 70; dgv.Columns[9].Width = 80; dgv.Columns[10].Width = 140; dgv.Columns[10].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm:ss"; dgv.Columns[11].Visible = false; if (New_DBAcess.blIsClient) { dgv.Columns["Measure"].Visible = false; dgv.Columns["EndHelp"].Visible = false; } } } return(true); } catch { return(false); } }
public FrmHisEmpHelp() { InitializeComponent(); label8.Text = HardwareName.Value(CorpsName.CodeSenderAddress) + ":"; label6.Text = HardwareName.Value(CorpsName.StationSplace) + ":"; label3.Text = HardwareName.Value(CorpsName.StaHeadSplace) + ":"; dgValue.Columns[0].HeaderText = HardwareName.Value(CorpsName.StationAddress); dgValue.Columns[1].HeaderText = HardwareName.Value(CorpsName.StationSplace); dgValue.Columns[2].HeaderText = HardwareName.Value(CorpsName.StaHeadAddress); dgValue.Columns[3].HeaderText = HardwareName.Value(CorpsName.StaHeadSplace); dgValue.Columns[4].HeaderText = HardwareName.Value(CorpsName.CodeSenderAddress); }