| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Windows.Forms;
- using System.Collections;
- using CoreFS.CA06;
- using Core.Mes.Client.Common;
- namespace Core.LgMes.Client.LgDeviceManager
- {
- public partial class FrmVacuumTankManage : Core.Mes.Client.Common.frmStyleBase
- {
- public FrmVacuumTankManage()
- {
- InitializeComponent();
- }
- private void FrmVacuumTankManage_Load(object sender, EventArgs e)
- {
- udteFrom.DateTime = DateTime.Today;
- udteTo.DateTime = DateTime.Today;
- proc_LoadCLID();
- proc_GetBaseInfo("", "");
- }
- private string ConvertShift(string strFlag, string strShift)
- {
- if (strFlag == "1")
- {
- switch (strShift.Substring(0, 1))
- {
- case "1":
- return "白";
- case "2":
- return "中";
- case "3":
- return "夜";
- default:
- return "";
- }
- }
- else if (strFlag == "2")
- {
- switch (strShift.Substring(1, 1))
- {
- case "1":
- return "甲";
- case "2":
- return "乙";
- case "3":
- return "丙";
- case "4":
- return "丁";
- default:
- return "";
- }
- }
- else if (strFlag == "3")
- {
- switch (strShift.Trim())
- {
- case "白":
- return "1";
- case "中":
- return "2";
- case "夜":
- return "3";
- default:
- return "";
- }
- }
- else if (strFlag == "4")
- {
- switch (strShift.Trim())
- {
- case "甲":
- return "1";
- case "乙":
- return "2";
- case "丙":
- return "3";
- case "丁":
- return "4";
- default:
- return "";
- }
- }
- return "";
- }
- private void SetLeftTableRowColor()
- {
- for (int i = 0; i < this.ugrdBaseInfo.Rows.Count; i++)
- {
- switch (this.ugrdBaseInfo.Rows[i].Cells["状态"].Text.Trim())
- {
- case "上线"://上线
- this.ugrdBaseInfo.Rows[i].Appearance.BackColor = Color.LightGreen;
- break;
- case "烘烤"://烘烤
- this.ugrdBaseInfo.Rows[i].Appearance.BackColor = Color.LightBlue;
- break;
- default:
- this.ugrdBaseInfo.Rows[i].Appearance.BackColor = Color.LightYellow;
- break;
- }
- }
- }
- private void SetRightTableRowColor()
- {
- for (int i = 0; i < this.ugrdUseInfo.Rows.Count; i++)
- {
- switch (this.ugrdUseInfo.Rows[i].Cells["状态"].Text.Trim())
- {
- case "上线"://上线
- this.ugrdUseInfo.Rows[i].Appearance.BackColor = Color.LightGreen;
- break;
- case "烘烤"://烘烤
- this.ugrdUseInfo.Rows[i].Appearance.BackColor = Color.LightBlue;
- break;
- default:
- this.ugrdUseInfo.Rows[i].Appearance.BackColor = Color.LightYellow;
- break;
- }
- }
- }
- private void proc_ResetEditArea()
- {
- try
- {
- txtID.Clear();
- ucmeCCM.Text = "";
- ucmeStatus.Text = "";
- txtLJCS.Clear();
- txtDQCS.Clear();
- txtOBCS.Clear();
- txtNO1.Clear();
- txtCS1.Clear();
- txtNO2.Clear();
- txtCS2.Clear();
- txtNO3.Clear();
- txtCS3.Clear();
- udteOnTime.Text = "";
- udteNextTime.Text = "";
- txtMemo.Clear();
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
- private void proc_ResetRepairArea()
- {
- try
- {
- txtID1.Clear();
- txtBegin1.Clear();
- txtEnd1.Clear();
- txtPeriod1.Clear();
- txtMemo1.Clear();
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
- private void proc_Edit()
- {
- try
- {
- if (ugrdUseInfo.Rows.Count == 0)
- return;
- if (ugrdUseInfo.ActiveRow == null)
- {
- MessageBox.Show("请选择要修改的使用记录!", "提示");
- return;
- }
- string strID = Convert.ToString(ugrdUseInfo.ActiveRow.Cells["ID"].Value);
- string strNO = Convert.ToString(ugrdUseInfo.ActiveRow.Cells["槽车编号"].Value);
- string strRHS = Convert.ToString(ugrdUseInfo.ActiveRow.Cells["RH炉号"].Value);
- string strCYCID = Convert.ToString(ugrdUseInfo.ActiveRow.Cells["周期编号"].Value);
- if (MessageBox.Show("确定要修改[" + strRHS + "]槽车[" + strNO + "]的当前使用记录吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- return;
- string strErr = "";
- ArrayList arry = new ArrayList();
- arry.Add("FrmVacuumTankManage_Query5");
- arry.Add(strID);
- arry.Add(strCYCID);
- 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("[" + strRHS + "]槽车[" + strNO + "]的当前使用记录修改失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
- int iCnt = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
- if (iCnt == 0)
- {
- MessageBox.Show("[" + strRHS + "]槽车[" + strNO + "]的当前使用记录不存在,无法修改!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- proc_GetBaseInfo(strRHS, strNO);
- return;
- }
- string strReturn = "";
- strErr = "";
- arry.Clear();
- ccs.ob = ob;
- arry.Add("FrmVacuumTankManage_Update.1");
- arry.Add(txtLJCS.Text.Trim());
- arry.Add(txtDQCS.Text.Trim());
- arry.Add(txtOBCS.Text.Trim());
- arry.Add(txtCS1.Text.Trim());
- arry.Add(txtCS2.Text.Trim());
- arry.Add(txtCS3.Text.Trim());
- arry.Add(udteOnTime.Text);
- arry.Add(udteNextTime.Text);
- arry.Add(txtMemo.Text.Trim());
- arry.Add(strID);
- arry.Add(strCYCID);
- strReturn = ccs.NoQueryFunctions("Core.LgMes.Server.Common.ComDBSave", "doSimpleSave", arry, out strErr);
- if (!(strErr == null || strErr == ""))
- {
- MessageBox.Show("[" + strRHS + "]槽车[" + strNO + "]的当前使用记录修改失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
- proc_GetBaseInfo(strRHS, strNO);
- MessageBox.Show("[" + strRHS + "]槽车[" + strNO + "]的当前使用记录修改成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message, "提示");
- }
- }
- private void proc_Del()
- {
- try
- {
- if (ugrdUseInfo.Rows.Count == 0)
- return;
- if (ugrdUseInfo.ActiveRow == null)
- {
- MessageBox.Show("请选择要删除的使用记录!", "提示");
- return;
- }
- string strID = Convert.ToString(ugrdUseInfo.ActiveRow.Cells["ID"].Value);
- string strNO = Convert.ToString(ugrdUseInfo.ActiveRow.Cells["槽车编号"].Value);
- string strRHS = Convert.ToString(ugrdUseInfo.ActiveRow.Cells["RH炉号"].Value);
- string strCYCID = Convert.ToString(ugrdUseInfo.ActiveRow.Cells["周期编号"].Value);
- if (MessageBox.Show("确定要删除[" + strRHS + "]槽车[" + strNO + "]的当前使用记录吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- return;
- string strErr = "";
- ArrayList arry = new ArrayList();
- arry.Add("FrmVacuumTankManage_Query6");
- arry.Add(strID);
- arry.Add(strCYCID);
- 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("[" + strRHS + "]槽车[" + strNO + "]的当前使用记录删除失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
- int iCnt = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
- if (iCnt == 0)
- {
- MessageBox.Show("[" + strRHS + "]槽车[" + strNO + "]的当前使用记录不存在,无法删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- proc_GetBaseInfo(strRHS, strNO);
- return;
- }
- ds = null;
- strErr = "";
- arry.Clear();
- ccs.ob = ob;
- arry.Add("FrmVacuumTankManage_Query7");
- arry.Add(strID);
- arry.Add(strCYCID);
- 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("[" + strRHS + "]槽车[" + strNO + "]的当前使用记录删除失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
- if (Convert.ToString(ds.Tables[0].Rows[0]["NOWSTATUS"]) != "1") //1代表上线
- {
- MessageBox.Show("[" + strRHS + "]槽车[" + strNO + "]的当前使用记录已经结束,不能删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
- string strReturn = "";
- strErr = "";
- arry.Clear();
- ccs.ob = ob;
- arry.Add("FrmVacuumTankManage_Del");
- arry.Add(strID);
- arry.Add(strCYCID);
- strReturn = ccs.NoQueryFunctions("Core.LgMes.Server.Common.ComDBSave", "doSimpleSave", arry, out strErr);
- if (!(strErr == null || strErr == ""))
- {
- MessageBox.Show("[" + strRHS + "]槽车[" + strNO + "]的当前使用记录删除失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
- strReturn = "";
- strErr = "";
- arry.Clear();
- arry.Add("FrmVacuumTankManage_Update.2");
- arry.Add(strID);
- ccs.ob = ob;
- strReturn = ccs.NoQueryFunctions("Core.LgMes.Server.Common.ComDBSave", "doSimpleSave", arry, out strErr);
- if (!(strErr == null || strErr == ""))
- {
- MessageBox.Show("[" + strRHS + "]槽车[" + strNO + "]的当前使用记录删除失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
- proc_GetBaseInfo(strRHS, strNO);
- MessageBox.Show("[" + strRHS + "]槽车[" + strNO + "]的当前使用记录删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message, "提示");
- }
- }
- /// <summary>
- /// 真空槽信息加载
- /// </summary>
- private void proc_LoadCLID()
- {
- try
- {
- string strErr = "";
- string strSql = "";
- if (chkRHS.Checked && ucmeRHS.SelectedIndex > -1)
- strSql="where RHS_ID = '" + ucmeRHS.Text.Trim() + "'";
- else
- strSql="";
- ArrayList arry = new ArrayList();
- ArrayList sqlList = new ArrayList();
- arry.Add("FrmVacuumTankManage_Query1");
- sqlList.Add(strSql);
- CoreClientParam CCP_LgEts = new CoreClientParam();
- DataTable dt = new DataTable();
- CCP_LgEts.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
- CCP_LgEts.MethodName = "doQuery";
- CCP_LgEts.ServerParams = new object[] { arry, sqlList };
- CCP_LgEts.SourceDataTable = dt;
- this.ExecuteQueryToDataTable(CCP_LgEts, CoreInvokeType.Internal);
- DataSet ds = new DataSet();
- ds.Tables.Add(dt);
- strErr = CCP_LgEts.ReturnInfo;
- if (strErr != "" || !(ds != null && ds.Tables.Count > 0))
- {
- MessageBox.Show("真空槽信息加载失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- if (MessageBox.Show("是否重新加载真空槽信息?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
- proc_LoadCLID();
- return;
- }
- ucmeID.DataSource = ds.Tables[0];
- ucmeID.DisplayMember = "TANKCARID";
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message, "提示");
- }
- }
- /// <summary>
- /// 基础信息查询
- /// </summary>
- /// <param name="strRHSID"></param>
- /// <param name="strVTKNO"></param>
- public void proc_GetBaseInfo(string strRHSID, string strVTKNO)
- {
- try
- {
- string strErr = "";
- string strWhere = "";
- if (chkRHS.Checked && ucmeRHS.Text.Trim().Length > 0)
- strWhere = "and t.RHS_ID = '" + ucmeRHS.Text.Trim() + "' ";
- if (chkID.Checked && ucmeID.Text.Length > 0)
- strWhere += "and t.TANKCARID = '" + ucmeID.Text.Trim() + "'";
- ArrayList arry = new ArrayList();
- ArrayList sqlList = new ArrayList();
- arry.Add("FrmVacuumTankManage_Query2");
- sqlList.Add(strWhere);
- CoreClientParam CCP_LgEts = new CoreClientParam();
- DataTable dt = new DataTable();
- CCP_LgEts.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
- CCP_LgEts.MethodName = "doQuery";
- CCP_LgEts.ServerParams = new object[] { arry, sqlList };
- CCP_LgEts.SourceDataTable = dt;
- this.ExecuteQueryToDataTable(CCP_LgEts, CoreInvokeType.Internal);
- DataSet ds = new DataSet();
- ds.Tables.Add(dt);
- strErr= CCP_LgEts.ReturnInfo;
- //try
- //{
- // ((DataTable)ugrdBaseInfo.DataSource).Rows.Clear();
- //}
- //catch (Exception)
- //{
- //}
- if (ds != null && ds.Tables[0].Rows.Count > 0)
- {
- ugrdBaseInfo.DataSource = ds.Tables[0];
- }
- if (strErr != "" || !(ds != null && ds.Tables.Count > 0))
- {
- MessageBox.Show("槽车信息查询失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
-
- SetLeftTableRowColor();
- if (ds.Tables[0].Rows.Count == 0)
- {
- proc_ResetRepairArea();
- return;
- }
- if (strRHSID.Length > 0) //定位记录
- {
- for (int i = 0; i < ugrdBaseInfo.Rows.Count; i++)
- {
- if (Convert.ToString(ugrdBaseInfo.Rows[i].Cells["RH炉号"].Value) == strRHSID)
- {
- if (strVTKNO.Length > 0)
- {
- if (Convert.ToString(ugrdBaseInfo.Rows[i].Cells["槽车编号"].Value) == strVTKNO)
- {
- ugrdBaseInfo.ActiveRow = ugrdBaseInfo.Rows[i];
- ugrdBaseInfo.Rows[i].Selected = true;
- return;
- }
- }
- else
- {
- ugrdBaseInfo.ActiveRow = ugrdBaseInfo.Rows[i];
- ugrdBaseInfo.Rows[i].Selected = true;
- return;
- }
- }
- }
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message, "提示");
- }
- }
- /// <summary>
- /// 使用信息
- /// </summary>
- /// <param name="strID"></param>
- private void proc_GetUseInfo(string strID)
- {
- try
- {
- string strErr = "";
- string strWhere = "";
- if (strID.Length > 0)
- strWhere = "and T.TANKCARID = '" + strID + "' ";
- if (chkDate.Checked)
- {
- strWhere += "and to_char(T.BEGINTIME,'yyyy-MM-dd') between '" + udteFrom.DateTime.ToString("yyyy-MM-dd") + "' and '" + udteTo.DateTime.ToString("yyyy-MM-dd") + "'";
- }
- else
- {
- strWhere += "and (T.TANKCARID, T.CYCID) in (select TANKCARID, CYCID from "
- + "(select row_number() over (partition by x.TANKCARID order by x.CYCID desc) xh, x.* "
- + "from DEV_ZKC_USE_DETAIL x) where xh < 3)";
- }
- ArrayList arry = new ArrayList();
- ArrayList sqlList = new ArrayList();
- arry.Add("FrmVacuumTankManage_Query3");
- sqlList.Add(strWhere);
- CoreClientParam CCP_LgEts = new CoreClientParam();
- DataTable dt = new DataTable();
- CCP_LgEts.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
- CCP_LgEts.MethodName = "doQuery";
- CCP_LgEts.ServerParams = new object[] { arry, sqlList };
- CCP_LgEts.SourceDataTable = dt;
- this.ExecuteQueryToDataTable(CCP_LgEts, CoreInvokeType.Internal);
- DataSet ds = new DataSet();
- ds.Tables.Add(dt);
- strErr = CCP_LgEts.ReturnInfo;
- try
- {
- ((DataSet)ugrdUseInfo.DataSource).Tables[0].Rows.Clear();
- }
- catch (Exception)
- {
- }
- if (ds != null && ds.Tables[0].Rows.Count > 0)
- {
- ugrdUseInfo.DataSource = ds;
- }
- if (strErr != "" || !(ds != null && ds.Tables.Count > 0))
- {
- MessageBox.Show("槽车[" + strID + "]使用信息查询失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
- SetRightTableRowColor();
- if (ds.Tables[0].Rows.Count == 0)
- proc_ResetEditArea();
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message, "提示");
- }
- }
- /// <summary>
- /// 烘烤信息查询
- /// </summary>
- /// <param name="strID"></param>
- private void proc_GetHotInfo(string strID)
- {
- try
- {
- if (strID.Length == 0) return;
- string strErr = "";
- ArrayList arry = new ArrayList();
- arry.Add("FrmVacuumTankManage_Query4");
- arry.Add(strID);
- 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("真空槽[" + strID + "]烘烤信息查询失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
- if (ds.Tables[0].Rows.Count > 0)
- {
- txtID1.Text = Convert.ToString(ds.Tables[0].Rows[0]["槽车编号"]);
- txtBegin1.Text = Convert.ToString(ds.Tables[0].Rows[0]["烘烤开始时刻"]);
- txtEnd1.Text = Convert.ToString(ds.Tables[0].Rows[0]["烘烤结束时刻"]);
- txtPeriod1.Text = Convert.ToString(ds.Tables[0].Rows[0]["烘烤时间"]);
- txtMemo1.Text = Convert.ToString(ds.Tables[0].Rows[0]["备注"]);
- }
- else
- proc_ResetRepairArea();
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message, "提示");
- }
- }
- /// <summary>
- /// 菜单
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="ToolbarKey"></param>
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "HotDetail":
- {
- FrmVTHotDetail frm = new FrmVTHotDetail(ob);//真空槽烘烤记录
- frm.ShowDialog();
- break;
- }
- case "PLUGIN":
- {
- FrmVTPluginInfo frm = new FrmVTPluginInfo(ob);//真空槽信息
- frm.ShowDialog();
- break;
- }
- case "BaseInfo":
- {
- FrmVTBaseInfo frm = new FrmVTBaseInfo(ob);//基础信息
- frm.Tag = this;
- if (ugrdBaseInfo.ActiveRow != null)
- {
- frm.strRHS = Convert.ToString(ugrdBaseInfo.ActiveRow.Cells["RH炉号"].Value);
- frm.strNo = Convert.ToString(ugrdBaseInfo.ActiveRow.Cells["槽车编号"].Value);
- }
- frm.ShowDialog();
- break;
- }
- case "VanHot":
- {
- FrmVTHot frm = new FrmVTHot(ob);//真空槽烘烤
- frm.Tag = this;
- if (ugrdBaseInfo.ActiveRow != null)
- {
- frm.strRHS = Convert.ToString(ugrdBaseInfo.ActiveRow.Cells["RH炉号"].Value);
- frm.strNo = Convert.ToString(ugrdBaseInfo.ActiveRow.Cells["槽车编号"].Value);
- }
- frm.ShowDialog();
- }
- break;
- case "Query":
- {
- proc_GetBaseInfo("", "");
- break;
- }
- case "Exit":
- {
- this.Close();
- break;
- }
- case "Update":
- {
- proc_Edit();
- break;
- }
- case "Delete":
- {
- proc_Del();
- break;
- }
- }
- }
- private void ulgridBaseInfo_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
- {
- try
- {
- if (ugrdBaseInfo.ActiveRow == null)
- return;
- FrmVT frm = new FrmVT(ob);
- frm.Tag = this;
- frm.strID = Convert.ToString(ugrdBaseInfo.ActiveRow.Cells["ID"].Value);
- frm.strNO = Convert.ToString(ugrdBaseInfo.ActiveRow.Cells["槽车编号"].Value);
- frm.strRHS = Convert.ToString(ugrdBaseInfo.ActiveRow.Cells["RH炉号"].Value);
- frm.strSTATUS = Convert.ToString(ugrdBaseInfo.ActiveRow.Cells["状态"].Value);
- frm.ShowDialog();
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message, "提示");
- }
- }
- private void ulgridBaseInfo_AfterRowActivate(object sender, EventArgs e)
- {
- try
- {
- if (ugrdBaseInfo.ActiveRow == null)
- return;
- string strID = Convert.ToString(ugrdBaseInfo.ActiveRow.Cells["ID"].Value);
- proc_GetUseInfo(strID);
- proc_GetHotInfo(strID);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message, "提示");
- }
- }
- private void ulgridUseInfo_AfterRowActivate(object sender, EventArgs e)
- {
- try
- {
- if (ugrdUseInfo.ActiveRow == null)
- return;
- Infragistics.Win.UltraWinGrid.UltraGridRow ulRow = ugrdUseInfo.ActiveRow;
- txtID.Text = Convert.ToString(ulRow.Cells["槽车编号"].Value);
- ucmeCCM.Text = Convert.ToString(ulRow.Cells["RH炉号"].Value);
- ucmeStatus.Text = Convert.ToString(ulRow.Cells["状态"].Value);
- txtLJCS.Text = Convert.ToString(ulRow.Cells["累计使用炉数"].Value);
- txtDQCS.Text = Convert.ToString(ulRow.Cells["本次使用炉数"].Value);
- txtOBCS.Text = Convert.ToString(ulRow.Cells["累计真空处理时间"].Value);
- txtNO1.Text = Convert.ToString(ulRow.Cells["ID1"].Value);
- txtCS1.Text = Convert.ToString(ulRow.Cells["CS1"].Value);
- txtNO2.Text = Convert.ToString(ulRow.Cells["ID2"].Value);
- txtCS2.Text = Convert.ToString(ulRow.Cells["CS2"].Value);
- txtNO3.Text = Convert.ToString(ulRow.Cells["ID3"].Value);
- txtCS3.Text = Convert.ToString(ulRow.Cells["CS3"].Value);
- udteOnTime.Text = Convert.ToString(ulRow.Cells["上线时间"].Value);
- udteNextTime.Text = Convert.ToString(ulRow.Cells["下线时间"].Value);
- txtMemo.Text = Convert.ToString(ulRow.Cells["备注"].Value);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message, "提示");
- }
- }
- private void chkID_CheckedChanged(object sender, EventArgs e)
- {
- ucmeID.Enabled = chkID.Checked;
- }
- private void cbCCM_CheckedChanged(object sender, EventArgs e)
- {
- ucmeRHS.Enabled = chkRHS.Checked;
- proc_LoadCLID();
- }
- private void cbbZJH_SelectedIndexChanged(object sender, EventArgs e)
- {
- proc_LoadCLID();
- }
- private void cbDate_CheckedChanged(object sender, EventArgs e)
- {
- udteFrom.Enabled = chkDate.Checked;
- udteTo.Enabled = chkDate.Checked;
- }
- private void NumberEditor_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (!(Char.IsNumber(e.KeyChar) || e.KeyChar == '\b' || e.KeyChar == '.') ||
- (((TextBox)(sender)).Text.Trim().Contains(".") && e.KeyChar == '.') ||
- (((TextBox)(sender)).Text.Trim().Length == 0 && e.KeyChar == '.'))
- {
- e.Handled = true;
- }
- }
- }
- }
|