| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using CoreFS.CA06;
- using Core.Mes.Client.Common;
- namespace Core.LgMes.Client.LgDeviceManager
- {
- public partial class FrmEAFBaseInfo : FrmLgDevFunctions
- {
- //OpeBase ob = null;
- public DataSet _ds;
- public FrmEAFBaseInfo(OpeBase oba)
- {
- InitializeComponent();
- cmbLKBH.SelectedIndex = 1;
- ob = oba;
- }
- /// <菜单栏>
- /// 菜单栏
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void toolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
- {
- switch (e.ClickedItem.Name)
- {
- case "ADD":
- {
- this.proc_Add();
- break;
- }
- case "EDIT":
- {
- this.proc_Edit();
- break;
- }
- case "DEL":
- {
- this.proc_Del();
- break;
- }
- case "CLOSE":
- {
- this.Close();
- break;
- }
- default:
- break;
- }
- }
- /// <电炉炉壳基本信息新增>
- /// 电炉炉壳基本信息新增
- /// </summary>
- private void proc_Add()
- {
- try
- {
- string LKBH = cmbLKBH.Text.Trim().ToString();
- string LH = cmbLH.Text.Trim().ToString();
- string JHBH = cmbPlan.Text.Trim().ToString();
- //string BB = cBxclass.Text.Trim().ToString();
- string BL = txtBL.Text.Trim().ToString();
- string BJ = txtBJ.Text.Trim().ToString();
- string CS = txtCS.Text.Trim().ToString();
- string LJ = txtLJ.Text.Trim().ToString();
- string MEMO = txtMEMO.Text.Trim().ToString();
- string SLKSYCS = txtSLKCS.Text.Trim().ToString();
- string[] strParams = new string[9] { LKBH, LH, JHBH, BL, BJ, CS, LJ, MEMO, SLKSYCS };
- string strErr = "";
- string msg = "";
- ProcedureZ("Core.LgMes.Server.DEV.Methods.DEVPublicMethods", "procedure", new object[] { "STL_DEV_Info.EafToolAdd", strParams },ob,out strErr, out msg);
- if (Convert.ToInt32(strErr) > 0)
- {
- FrmSteelBagManage FRMST = (FrmSteelBagManage)this.Tag;//获取主界面方法
- FRMST.EAFInfo();//主界面基本信息查询
- MessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- this.Close();
- }
- else
- MessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
- /// <summary>
- /// 电炉炉壳基本信息修改
- /// </summary>
- private void proc_Edit()
- {
- try
- {
- string LKBH = cmbLKBH.Text.Trim().ToString();
- string LH = cmbLH.Text.Trim().ToString();
- string JHBH = cmbPlan.Text.Trim().ToString();
- string riqi = dTPkdate.Value.ToString("yyyy-MM-dd");
- string BL = txtBL.Text.Trim().ToString();
- string BJ = txtBJ.Text.Trim().ToString();
- string CS = txtCS.Text.Trim().ToString();
- string LJ = txtLJ.Text.Trim().ToString();
- string MEMO = txtMEMO.Text.Trim().ToString();
- string SLKSYCS = txtSLKCS.Text.Trim().ToString();
- string[] strParams = new string[10] { LKBH, LH, JHBH, riqi, BL, BJ, CS, LJ, MEMO, SLKSYCS };
- string strErr = "";
- string msg = "";
- ProcedureZ("Core.LgMes.Server.DEV.Methods.DEVPublicMethods", "procedure", new object[] { "STL_DEV_Info.EafToolExit", strParams }, ob, out strErr, out msg);
- if (Convert.ToInt32(strErr) > 0)
- {
- FrmSteelBagManage FRMST = (FrmSteelBagManage)this.Tag;//获取主界面方法
- FRMST.EAFInfo();//主界面基本信息查询
- MessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- this.Close();
- }
- else
- MessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
- /// <summary>
- /// 删除
- /// </summary>
- private void proc_Del()
- {
- try
- {
- string LKBH = cmbLKBH.Text.Trim().ToString();
- string[] strParams = new string[1] { LKBH};
- string strErr = "";
- string msg = "";
- ProcedureZ("Core.LgMes.Server.DEV.Methods.DEVPublicMethods", "procedure", new object[] { "STL_DEV_Info.EafToolDEL", strParams }, ob, out strErr, out msg);
- if (Convert.ToInt32(strErr) > 0)
- {
- FrmSteelBagManage FRMST = (FrmSteelBagManage)this.Tag;//获取主界面方法
- FRMST.EAFInfo();//主界面基本信息查询
- MessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- this.Close();
- }
- else
- MessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
- private void FrmEAFBaseInfo_Load(object sender, EventArgs e)
- {
- //绑定炉壳编号
- loadquery();
- //绑定包龄包级~~~
- LKBHquery();
- }
- //绑定炉壳编号
- private void loadquery()
- {
- if (this._ds == null) return;
- for (int i = 0; i < _ds.Tables[0].Rows.Count; i++)
- {
- cmbLKBH.Items.Add(_ds.Tables[0].Rows[i]["EAFSHELLID"].ToString());//炉壳编号
- cmbLH.Items.Add(_ds.Tables[0].Rows[i]["HEATNO"].ToString());//炉号
- cmbPlan.Items.Add(_ds.Tables[0].Rows[i]["PLANID"].ToString());//计划编号
- }
- }
- //绑定包龄包级~~~
- /// <summary>
- /// 绑定包龄包级
- /// </summary>
- private void LKBHquery()
- {
- string sqlstr="select B.EAFSHELLID,B.HEATNO,B.EAFSHELLLVL,B.EAFSHELLAGE,"
- + "B.EAFSHELLSTATUS,B.STEELACCOUNT,B.USETIMES,B.PLANID,B.BUYDATE,B.NOZZLEOUTFITUSETIMES,B.BRICKFACTORY,MEMO,ONFUACEVIEWS "
- + "from dev_eafshell_base_info B where EAFSHELLID='" + cmbLKBH.Text.Trim()+ "'";
- DataSet ds = QueryFixedFunions(sqlstr, ob);
- if (ds.Tables[0].Rows.Count > 0)
- {
- txtBL.Text = ds.Tables[0].Rows[0]["EAFSHELLAGE"].ToString();
- txtBJ.Text = ds.Tables[0].Rows[0]["EAFSHELLLVL"].ToString();
- cmbLH.Text = ds.Tables[0].Rows[0]["HEATNO"].ToString();
- cmbPlan.Text = ds.Tables[0].Rows[0]["PLANID"].ToString();
- dTPkdate.Text = ds.Tables[0].Rows[0]["BUYDATE"].ToString();
- txtCS.Text = ds.Tables[0].Rows[0]["USETIMES"].ToString();
- txtLJ.Text = ds.Tables[0].Rows[0]["STEELACCOUNT"].ToString();
- txtMEMO.Text = ds.Tables[0].Rows[0]["MEMO"].ToString();
- txtSLKCS.Text = ds.Tables[0].Rows[0]["ONFUACEVIEWS"].ToString();
- }
- }
- private void cBxLKBH_SelectionChanged(object sender, EventArgs e)
- {
- LKBHquery();
- }
- }
- }
|