using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using CoreFS.CA06; using Core.Mes.Client.Common; using System.Collections; namespace Core.LgMes.Client.LgDeviceManager { public partial class FrmCLRepairBP : Core.Mes.Client.Common.frmStyleBase { bool bOK = false; //是否响应结晶器号选择改变事件 public string strNo = "", strCCM = ""; public FrmCLRepairBP(OpeBase oba) { InitializeComponent(); ob = oba; } private void FrmCLRepairBP_Load(object sender, EventArgs e) { if (strCCM.Length > 0) { cmbCCM.Text = strCCM; this.cbbCCM_SelectedIndexChanged(this, null); if (strNo.Length > 0) { cmbID.Text = strNo; bOK = true; this.cbbID_SelectedIndexChanged(this, null); } } else { bOK = true; proc_ResetControl(); btnBegin.Enabled = btnEnd.Enabled = false; } } private void NumberEditor_KeyPress(object sender, KeyPressEventArgs e) { if (!(Char.IsNumber(e.KeyChar) || e.KeyChar == '\b')) { e.Handled = true; } } /// /// 加载结晶器编号 /// /// private void proc_GetID(string strCCM) { try { if (strCCM.Length == 0) return; string strErr = ""; ArrayList arry = new ArrayList(); if (strCCM == "1#连铸机" || strCCM == "2#连铸机") { arry.Add("OneandTwoCCM.select"); } else { arry.Add("CRYSTALLIZERID.select"); arry.Add(strCCM); } CommonClientToServer ccs = new CommonClientToServer(); ccs.ob = this.ob; DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr); if (strErr != "" || !(ds != null && ds.Tables.Count > 0)) { MessageBox.Show("结晶器号加载失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); if (MessageBox.Show("是否重新加载结晶器号?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) proc_GetID(strCCM); return; } cmbID.DataSource = ds.Tables[0]; cmbID.DisplayMember = "CRYSTALLIZERID"; if (ds.Tables[0].Rows.Count == 0) { proc_ResetControl(); btnBegin.Enabled = btnEnd.Enabled = false; } } catch (Exception ex) { MessageBox.Show(ex.Message); } } private void proc_ResetControl() { try { cmbID.Text = ""; cmbType.SelectedIndex = -1; cmbReason.Text = ""; udteRepair.Text = ""; udteRepairTime.Text = ""; txtCurrID1.Clear(); txtCurrID2.Clear(); txtCurrID3.Clear(); txtCurrID4.Clear(); txtCurrID5.Clear(); txtCurrID6.Clear(); cmbID1.SelectedIndex = -1; cmbID2.SelectedIndex = -1; cmbID3.SelectedIndex = -1; cmbID4.SelectedIndex = -1; cmbID5.SelectedIndex = -1; cmbID6.SelectedIndex = -1; txtCurrCS1.Clear(); txtCurrCS2.Clear(); txtCurrCS3.Clear(); txtCurrCS4.Clear(); txtCurrCS5.Clear(); txtCurrCS6.Clear(); txtCS1.Clear(); txtCS2.Clear(); txtCS3.Clear(); txtCS4.Clear(); txtCS5.Clear(); txtCS6.Clear(); txtMemo.Clear(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } private TextBox proc_GetTextBox(string strComboBoxName) { switch (strComboBoxName) { case "cbbID1": { return txtCS1; } case "cbbID2": { return txtCS2; } case "cbbID3": { return txtCS3; } case "cbbID4": { return txtCS4; } case "cbbID5": { return txtCS5; } case "cbbID6": { return txtCS6; } } return null; } /// /// 维修开始 /// private void proc_Begin() { try { if (cmbID.Items.Count == 0) return; string strCcm = cmbCCM.Text.Trim(); string strID = cmbID.Text.Trim(); if (strID.Length == 0) { MessageBox.Show("请选择需要维修的结晶器编号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); cmbID.Focus(); return; } string strType = cmbType.Text.Trim(); if (strType.Length == 0) { MessageBox.Show("请选择维修类别!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); cmbType.Focus(); return; } if (udteRepair.Text.Trim().Length == 0) udteRepair.DateTime = DateTime.Now; if (MessageBox.Show("确定要维修[" + strCcm + "]的结晶器[" + strID + "]吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { proc_GetID(strCcm); return; } string strErr = ""; ArrayList arry = new ArrayList(); arry.Add("FrmCLRepairBP.Select_6"); arry.Add(strCcm); arry.Add(strID); CommonClientToServer ccs = new CommonClientToServer(); ccs.ob = this.ob; DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr); if (strErr != "" || !(ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)) { MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]维修信息保存失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } int iCnt = Convert.ToInt32(ds.Tables[0].Rows[0][0]); if (iCnt == 0) { MessageBox.Show("[" + strCcm + "]不存在结晶器[" + strID + "]信息,无法维修!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); proc_GetID(strCcm); cmbID.Focus(); return; } iCnt = 0; ds = null; strErr = ""; arry.Clear(); ccs.ob = this.ob; arry.Add("FrmCLRepairBP.Select_7"); arry.Add(strCcm); arry.Add(strID); ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr); if (strErr != "" || !(ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)) { MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]维修信息保存失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (Convert.ToString(ds.Tables[0].Rows[0]["NOWSTATUS"].ToString().Trim()) != "下线") { MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]当前状态[" + Convert.ToString(ds.Tables[0].Rows[0]["NOWSTATUS"]) + "],只有在[下线]状态才能维修!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); cmbID.Focus(); return; } #region//水箱信息修改 string strReturn = ""; #endregion strErr = ""; arry.Clear(); ccs.ob = this.ob; arry.Add("FrmCLRepairBP.Update_2"); arry.Add(strID); arry.Add(strCcm); arry.Add(strType); arry.Add(udteRepair.DateTime.ToString("yyyy-MM-dd HH:mm:ss")); arry.Add(cmbReason.Text.Trim()); arry.Add(txtMemo.Text.Trim()); arry.Add(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName()); strReturn = ccs.NoQueryFunctions("Core.LgMes.Server.Common.ComDBSave", "doSimpleSave", arry, out strErr); if (!(strErr == null || strErr == "")) { MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]维修信息保存失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } strErr = ""; strReturn = ""; arry.Clear(); ccs.ob = this.ob; arry.Add("FrmCLRepairBP.Update_3"); arry.Add(""); arry.Add(""); arry.Add(""); arry.Add(""); arry.Add(""); arry.Add(""); arry.Add(strCcm); arry.Add(strID); strReturn = ccs.NoQueryFunctions("Core.LgMes.Server.Common.ComDBSave", "doSimpleSave", arry, out strErr); if (!(strErr == null || strErr == "")) { MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]维修信息保存失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } FrmCrystallizerManageBP frm = (FrmCrystallizerManageBP)this.Tag; frm.proc_GetBaseInfo(strCcm, strID); proc_GetID(strCcm); MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]维修信息保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); return; } catch (Exception ex) { MessageBox.Show(ex.Message); } } /// /// 维修结束 /// private void proc_End() { try { if (cmbID.Items.Count == 0) return; string strCcm = cmbCCM.Text.Trim(); string strID = cmbID.Text.Trim(); if (strID.Length == 0) { MessageBox.Show("请选择维修中的结晶器编号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); cmbID.Focus(); return; } string strType = cmbType.Text.Trim(); if (strType.Length == 0) { MessageBox.Show("请选择维修类别!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); cmbType.Focus(); return; } if (udteRepairTime.Text.Trim().Length == 0) udteRepairTime.DateTime = DateTime.Now; if (udteRepair.DateTime > udteRepairTime.DateTime) { MessageBox.Show("送修时间不能大于修复时间!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); udteRepairTime.Focus(); return; } #region #endregion if (MessageBox.Show("确定[" + strCcm + "]结晶器[" + strID + "]维修结束吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { proc_GetID(strCcm); return; } string strErr = ""; ArrayList arry = new ArrayList(); arry.Add("FrmCLRepairBP.Select_8"); arry.Add(strCcm); arry.Add(strID); CommonClientToServer ccs = new CommonClientToServer(); ccs.ob = this.ob; DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr); if (strErr != "" || !(ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)) { MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]维修信息保存失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } int iCnt = Convert.ToInt32(ds.Tables[0].Rows[0][0]); if (iCnt == 0) { MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]信息不存在,无法保存维修信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); proc_GetID(strCcm); cmbID.Focus(); return; } iCnt = 0; ds = null; strErr = ""; arry.Clear(); ccs.ob = this.ob; arry.Add("FrmCLRepairBP.Select_9"); arry.Add(strCcm); arry.Add(strID); ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr); if (strErr != "" || !(ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)) { MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]维修信息保存失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (Convert.ToString(ds.Tables[0].Rows[0]["NOWSTATUS"].ToString().Trim()) != "维修") { MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]当前状态[" + Convert.ToString(ds.Tables[0].Rows[0]["NOWSTATUS"]) + "],只有在[维修]状态才能结束维修!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); cmbID.Focus(); return; } #region//水箱信息修改 string strReturn = ""; #endregion strErr = ""; strReturn = ""; arry.Clear(); ccs.ob = this.ob; arry.Add("FrmCLRepairBP.Update_4"); arry.Add(strType); arry.Add(udteRepair.DateTime.ToString("yyyy-MM-dd HH:mm:ss")); arry.Add(udteRepairTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss")); arry.Add(cmbReason.Text.Trim()); arry.Add(txtMemo.Text.Trim()); arry.Add(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName()); arry.Add(strID); arry.Add(strCcm); strReturn = ccs.NoQueryFunctions("Core.LgMes.Server.Common.ComDBSave", "doSimpleSave", arry, out strErr); if (!(strErr == null || strErr == "")) { MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]维修信息保存失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } strErr = ""; strReturn = ""; arry.Clear(); ccs.ob = this.ob; arry.Add("FrmCLRepairBP.Update_5"); arry.Add(""); arry.Add(""); arry.Add(""); arry.Add(""); arry.Add(""); arry.Add(""); arry.Add(strCcm); arry.Add(strID); strReturn = ccs.NoQueryFunctions("Core.LgMes.Server.Common.ComDBSave", "doSimpleSave", arry, out strErr); if (!(strErr == null || strErr == "")) { MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]维修信息保存失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } FrmCrystallizerManageBP frm = (FrmCrystallizerManageBP)this.Tag; frm.proc_GetBaseInfo(strCcm, strID); proc_GetID(strCcm); MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]维修信息保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); return; } catch (Exception ex) { MessageBox.Show(ex.Message); } } /// /// 维修开始 /// /// /// private void btnBegin_Click(object sender, EventArgs e) { proc_Begin(); } /// /// 维修结束 /// /// /// private void btnEnd_Click(object sender, EventArgs e) { proc_End(); } /// /// 加载结晶器信息 /// /// /// private void proc_GetPluginInfo(string strCCM, string strID) { try { if (strCCM.Length == 0) return; string strErr = ""; ArrayList arry = new ArrayList(); arry.Add("FrmCLRepairBP.Select_1"); arry.Add(strCCM); arry.Add(strCCM); arry.Add(strID); arry.Add(strCCM); arry.Add(strID); arry.Add(strCCM); arry.Add(strID); arry.Add(strCCM); arry.Add(strID); arry.Add(strCCM); arry.Add(strID); arry.Add(strCCM); arry.Add(strID); CommonClientToServer ccs = new CommonClientToServer(); ccs.ob = this.ob; DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr); if (strErr != "" || !(ds != null && ds.Tables.Count > 0)) { MessageBox.Show("结晶器插件信息加载失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); if (MessageBox.Show("是否重新加载结晶器插件信息?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) proc_GetPluginInfo(strCCM, strID); return; } if (ds.Tables[0].Rows.Count>0) { DataRow dr = ds.Tables[0].NewRow(); dr["ID"] = "0"; dr["PLUGINNO"] = ""; dr["TYPE"] = "2"; ds.Tables[0].Rows.InsertAt(dr, 0); dr = ds.Tables[0].NewRow(); dr["ID"] = "0"; dr["PLUGINNO"] = ""; dr["TYPE"] = "1"; ds.Tables[0].Rows.InsertAt(dr, 0); dr = ds.Tables[0].NewRow(); dr["ID"] = "0"; dr["PLUGINNO"] = ""; dr["TYPE"] = "0"; ds.Tables[0].Rows.InsertAt(dr, 0); DataSet ds1 = ds.Copy(); DataView dv1 = ds1.Tables[0].DefaultView; dv1.RowFilter = "Type = '0'"; DataSet ds2 = ds.Copy(); DataView dv2 = ds2.Tables[0].DefaultView; dv2.RowFilter = "Type = '0'"; DataSet ds3 = ds.Copy(); DataView dv3 = ds3.Tables[0].DefaultView; dv3.RowFilter = "Type = '1'"; DataSet ds4 = ds.Copy(); DataView dv4 = ds4.Tables[0].DefaultView; dv4.RowFilter = "Type = '1'"; DataSet ds5 = ds.Copy(); DataView dv5 = ds5.Tables[0].DefaultView; dv5.RowFilter = "Type = '2'"; DataSet ds6 = ds.Copy(); DataView dv6 = ds6.Tables[0].DefaultView; dv6.RowFilter = "Type = '2'"; cmbID1.DataSource = dv1; cmbID1.ValueMember = "ID"; cmbID1.DisplayMember = "PLUGINNO"; cmbID2.DataSource = dv2; cmbID2.ValueMember = "ID"; cmbID2.DisplayMember = "PLUGINNO"; cmbID3.DataSource = dv3; cmbID3.ValueMember = "ID"; cmbID3.DisplayMember = "PLUGINNO"; cmbID4.DataSource = dv4; cmbID4.ValueMember = "ID"; cmbID4.DisplayMember = "PLUGINNO"; cmbID5.DataSource = dv5; cmbID5.ValueMember = "ID"; cmbID5.DisplayMember = "PLUGINNO"; cmbID6.DataSource = dv6; cmbID6.ValueMember = "ID"; cmbID6.DisplayMember = "PLUGINNO"; } } catch (Exception ex) { MessageBox.Show(ex.Message); } } private void cbbCCM_SelectedIndexChanged(object sender, EventArgs e) { if (cmbCCM.Text.Length > 0) { proc_GetPluginInfo(cmbCCM.Text, ""); proc_GetID(cmbCCM.Text); } } private void cbbID_SelectedIndexChanged(object sender, EventArgs e) { try { proc_GetPluginInfo(cmbCCM.Text.Trim(), cmbID.Text.Trim()); if (!bOK) return; string strCcm = cmbCCM.Text.Trim(); string strID = cmbID.Text.Trim(); if (strID.Length == 0) { cmbType.SelectedIndex = -1; cmbReason.Text = ""; udteRepair.Text = ""; udteRepairTime.Text = ""; txtCurrID1.Clear(); txtCurrID2.Clear(); txtCurrID3.Clear(); txtCurrID4.Clear(); txtCurrID5.Clear(); txtCurrID6.Clear(); cmbID1.SelectedIndex = -1; cmbID2.SelectedIndex = -1; cmbID3.SelectedIndex = -1; cmbID4.SelectedIndex = -1; cmbID5.SelectedIndex = -1; cmbID6.SelectedIndex = -1; txtCurrCS1.Clear(); txtCurrCS2.Clear(); txtCurrCS3.Clear(); txtCurrCS4.Clear(); txtCurrCS5.Clear(); txtCurrCS6.Clear(); txtCS1.Clear(); txtCS2.Clear(); txtCS3.Clear(); txtCS4.Clear(); txtCS5.Clear(); txtCS6.Clear(); txtMemo.Clear(); btnBegin.Enabled = btnEnd.Enabled = false; return; } string strErr = ""; ArrayList arry = new ArrayList(); arry.Add("FrmCLRepairBP.Select_3"); arry.Add(strID); arry.Add(strCcm); CommonClientToServer ccs = new CommonClientToServer(); ccs.ob = this.ob; DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr); if (strErr != "" || !(ds != null && ds.Tables.Count > 0)) { MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]维修信息查询失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (ds.Tables[0].Rows.Count > 0) { cmbType.Text = Convert.ToString(ds.Tables[0].Rows[0]["REPAIRTYPE"]); udteRepair.DateTime = Convert.ToDateTime(ds.Tables[0].Rows[0]["REPAIRTIME"]); udteRepairTime.Text = ""; cmbReason.Text = Convert.ToString(ds.Tables[0].Rows[0]["REASON"]); txtMemo.Text = Convert.ToString(ds.Tables[0].Rows[0]["MEMO"]); btnBegin.Enabled = false; } else { cmbType.SelectedIndex = -1; udteRepair.Text = ""; udteRepairTime.Text = ""; cmbReason.Text = ""; txtMemo.Clear(); btnBegin.Enabled = true; } btnEnd.Enabled = !btnBegin.Enabled; ds = null; strErr = ""; arry.Clear(); arry.Add("FrmCLRepairBP.Select_4"); arry.Add(strID); arry.Add(strCcm); ccs.ob = this.ob; ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr); if (strErr != "" || !(ds != null && ds.Tables.Count > 0)) { MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]基本信息查询失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (ds.Tables[0].Rows.Count == 0) return; txtCurrID1.Text = Convert.ToString(ds.Tables[0].Rows[0]["NO1"]); cmbID1.SelectedValue = Convert.ToString(ds.Tables[0].Rows[0]["ID1"]); txtCS1.Text = txtCurrCS1.Text = Convert.ToString(ds.Tables[0].Rows[0]["CS1"]); txtCurrID2.Text = Convert.ToString(ds.Tables[0].Rows[0]["NO2"]); cmbID2.SelectedValue = Convert.ToString(ds.Tables[0].Rows[0]["ID2"]); txtCS2.Text = txtCurrCS2.Text = Convert.ToString(ds.Tables[0].Rows[0]["CS2"]); txtCurrID3.Text = Convert.ToString(ds.Tables[0].Rows[0]["NO3"]); cmbID3.SelectedValue = Convert.ToString(ds.Tables[0].Rows[0]["ID3"]); txtCS3.Text = txtCurrCS3.Text = Convert.ToString(ds.Tables[0].Rows[0]["CS3"]); txtCurrID4.Text = Convert.ToString(ds.Tables[0].Rows[0]["NO4"]); cmbID4.SelectedValue = Convert.ToString(ds.Tables[0].Rows[0]["ID4"]); txtCS4.Text = txtCurrCS4.Text = Convert.ToString(ds.Tables[0].Rows[0]["CS4"]); txtCurrID5.Text = Convert.ToString(ds.Tables[0].Rows[0]["NO5"]); cmbID5.SelectedValue = Convert.ToString(ds.Tables[0].Rows[0]["ID5"]); txtCS5.Text = txtCurrCS5.Text = Convert.ToString(ds.Tables[0].Rows[0]["CS5"]); txtCurrID6.Text = Convert.ToString(ds.Tables[0].Rows[0]["NO6"]); cmbID6.SelectedValue = Convert.ToString(ds.Tables[0].Rows[0]["ID6"]); txtCS6.Text = txtCurrCS6.Text = Convert.ToString(ds.Tables[0].Rows[0]["CS6"]); } catch (Exception ex) { MessageBox.Show(ex.Message, "提示"); } } private void PlugIn_SelectedIndexChanged(object sender, EventArgs e) { try { ComboBox cbb = sender as ComboBox; if (cbb == null) return; if (!(cbb is ComboBox)) return; string str = cbb.SelectedValue.ToString(); if (cbb.SelectedItem != null) { DataRowView rowView = (DataRowView)cbb.SelectedItem; str = rowView.Row["ID"].ToString(); } if (str.Length == 0) return; string strErr = ""; ArrayList arry = new ArrayList(); arry.Add("FrmCLRepairBP.Select_5"); arry.Add(str); CommonClientToServer ccs = new CommonClientToServer(); ccs.ob = this.ob; DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr); if (strErr != "" || !(ds != null && ds.Tables.Count > 0)) { return; } if (ds.Tables[0].Rows.Count == 0) { proc_GetTextBox(cbb.Name).Clear(); return; } proc_GetTextBox(cbb.Name).Text = Convert.ToString(ds.Tables[0].Rows[0]["USETIMES"]); } catch { } } private void ulgrpBaseInfoEdit_Click(object sender, EventArgs e) { } } }