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 System.Collections; namespace Core.LZMes.Client.UIK { public partial class UIK030010 : FrmBase { public UIK030010() { InitializeComponent(); } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": this.DoQuery(); break; case "Insert": this.DoInsert(); break; case "Update": this.DoUpdate(); break; } } private void DoQuery() { if (this.ultraCalendarENDTIME.Enabled == false && this.ultraCalendarSTRATTIME.Enabled == false) { this.ultraCalendarENDTIME.Text = ""; this.ultraCalendarSTRATTIME.Text = ""; } try { string mc_id = this.ultraTextMC_ID.Text.ToString(); string starttiem = this.ultraCalendarSTRATTIME.Text.ToString(); string endtime = this.ultraCalendarENDTIME.Text.ToString(); bool flag = false; CoreClientParam ccp = new CoreClientParam(); DataTable dt = new DataTable(); if (mc_id == "" && starttiem == "" && endtime == "" && this.ultraCheckAll.Checked == false) { MessageBox.Show("请选择查询条件!"); } else { if (this.ultraCheckAll.Checked) { this.ultraCheckAll.Checked = false; ccp.ServerName = "UIK.UIK03.UIK030010"; ccp.MethodName = "DoQuery"; ccp.ServerParams = new object[] { mc_id, starttiem, endtime, flag }; ccp.SourceDataTable = dt; //dt = this.dataSet1.Tables[0]; //ccp.SourceDataTable = dt; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); this.ultraGrid1.DataSource = dt; //Console.WriteLine(this.dataSet1.Tables[0].ToString()); if (dt.Rows.Count <= 0) { MessageBox.Show("暂无记录!"); } this.ultraCalendarENDTIME.Enabled = false; this.ultraCalendarSTRATTIME.Enabled = false; return; } else { flag = true; if (this.ultraTextMC_ID.Text != "" || this.ultraCheckEditor1.Checked == true) { if (this.ultraTextMC_ID.Text == "") { this.ultraTextMC_ID.Clear(); this.ultraCheckEditor1.Checked = false; this.ultraCheckAll.Checked = false; ccp.ServerName = "UIK.UIK03.UIK030010"; ccp.MethodName = "DoQuery"; ccp.ServerParams = new object[] { mc_id, starttiem, endtime, flag }; ccp.SourceDataTable = dt; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); this.ultraGrid1.DataSource = dt; if (dt.Rows.Count <= 0) { MessageBox.Show("该时间内没有入库信息!"); } this.ultraCalendarENDTIME.Enabled = false; this.ultraCalendarSTRATTIME.Enabled = false; return; } if (this.ultraCheckEditor1.Checked == false) { this.ultraTextMC_ID.Clear(); this.ultraCheckAll.Checked = false; ccp.ServerName = "UIK.UIK03.UIK030010"; ccp.MethodName = "DoQuery"; ccp.ServerParams = new object[] { mc_id, starttiem, endtime, flag }; ccp.SourceDataTable = dt; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); this.ultraGrid1.DataSource = dt; if (dt.Rows.Count <= 0) { MessageBox.Show("该设备信息不存在!"); } this.ultraCalendarENDTIME.Enabled = false; this.ultraCalendarSTRATTIME.Enabled = false; return; } if (this.ultraTextMC_ID.Text != "" && this.ultraCheckEditor1.Checked == true) { this.ultraTextMC_ID.Clear(); this.ultraCheckEditor1.Checked = false; this.ultraCheckAll.Checked = false; ccp.ServerName = "UIK.UIK03.UIK030010"; ccp.MethodName = "DoQuery"; ccp.ServerParams = new object[] { mc_id, starttiem, endtime, flag }; ccp.SourceDataTable = dt; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); this.ultraGrid1.DataSource = dt; if (dt.Rows.Count <= 0) { MessageBox.Show("记录不存在,请查证后查询!"); } this.ultraCalendarENDTIME.Enabled = false; this.ultraCalendarSTRATTIME.Enabled = false; return; } } } } } catch (Exception Ex) { MessageBox.Show(Ex.ToString()); } } private void ultraCheckAll_CheckedChanged(object sender, EventArgs e) { try { if (this.ultraCheckAll.Checked) { this.ultraTextMC_ID.Enabled = false; this.ultraCalendarSTRATTIME.Enabled = false; this.ultraCalendarENDTIME.Enabled = false; } if (!this.ultraCheckAll.Checked) { this.ultraTextMC_ID.Enabled = true; this.ultraCalendarSTRATTIME.Enabled = false; this.ultraCalendarENDTIME.Enabled = false; } } catch (Exception Ex) { MessageBox.Show(Ex.ToString()); } } private void ultraCheckEditor1_CheckedChanged(object sender, EventArgs e) { if (this.ultraCheckEditor1.Checked) { this.ultraCalendarENDTIME.Enabled = true; this.ultraCalendarSTRATTIME.Enabled = true; } if (!this.ultraCheckEditor1.Checked) { this.ultraCalendarENDTIME.Enabled = false; this.ultraCalendarSTRATTIME.Enabled = false; this.ultraCalendarSTRATTIME.Text = ""; this.ultraCalendarENDTIME.Text = ""; } } private void UIK030010_Load(object sender, EventArgs e) { this.ultraCalendarENDTIME.Enabled = false; this.ultraCalendarSTRATTIME.Enabled = false; this.ultraCalendarMC_IN_DTIME.Text = ""; this.ultraCalendarMC_USE_TIME.Text = ""; this.ultraCalendarMC_CHANGTIME.Text = ""; this.ultraCalendarMC_CHECKTIME.Text = ""; } private void DoUpdate() { if (MessageBox.Show("您确认要修改?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes) { try { Infragistics.Win.UltraWinGrid.UltraGridRow ugr = this.ultraGrid1.ActiveRow; if (ugr.Cells["SELECT_ITEM"].Text.ToString() == "True") { string mcid,reg_intime, IMC_NAME, IMC_MODEL, IMC_SPEC, IMC_FACTORY, IMC_IN_DTIME, IMC_PRICE, IMC_CARE_SECTOR, IMC_NOM_CAP, IMC_UNIT, IMC_TAI, IMC_ACT, IMC_MFACTUR_UNITS, IMC_USE_YEAR, IMC_USE_TIME, IMC_INSTAL_LOCAL, IREG_IN_ID, IMC_STAT, IMAIN_MC_NAME, IMC_INSTAL_COUNT, IREQ_SPAR_COUNT, IREA_STO_CONUT, IMC_CHECKREASON, IMC_CHANGTIME, IMC_CHECKCYCLE, IMC_CHECKTIME, IMC_CHANGCYCLE,IAREA; mcid = ugr.Cells["MC_ID"].Value.ToString(); reg_intime = ugr.Cells["REG_IN_DTIME"].Value.ToString(); this.ultraTextMCID2.Enabled = false; IMC_NAME = this.ultraTextMC_NAME.Text; IMC_MODEL = this.ultraTextMC_MODEL.Text; IMC_SPEC = this.ultraTextMC_SPEC.Text; IMC_FACTORY = this.ultraTextMC_FACTORY.Text; IMC_IN_DTIME = this.ultraCalendarMC_IN_DTIME.Text; IMC_USE_TIME = this.ultraCalendarMC_USE_TIME.Text; IMC_PRICE = this.ultraTextMC_PRICE.Text; IMC_CARE_SECTOR = this.ultraTextMC_CARE_SECTOR.Text; IMC_NOM_CAP = this.ultraTextMC_NOM_CAP.Text; IMC_UNIT = this.ultraTextMC_UNIT.Text; IMC_ACT = this.ultraTextMC_ACT.Text; IMC_TAI = this.ultraTextMC_TAI.Text; IMC_MFACTUR_UNITS = this.ultraTextMC_MFACTUR_UNITS.Text; IMC_USE_YEAR = this.ultraTextMC_USE_YEAR.Text; IMC_INSTAL_LOCAL = this.ultraTextMC_INSTAL_LOCAL.Text; IREG_IN_ID = this.ultraTextREG_IN_ID.Text; IMC_STAT = this.ultraComboMC_STAT.Text; IMAIN_MC_NAME = this.ultraTextMAIN_MC_NAME.Text; IMC_INSTAL_COUNT = this.ultraTextMC_INSTAL_COUNT.Text; IREQ_SPAR_COUNT = this.ultraTextREQ_SPAR_COUNT.Text; IREA_STO_CONUT = this.ultraTextREA_STO_CONUT.Text; IMC_CHECKREASON = this.ultraTextMC_CHECKREASON.Text; IMC_CHANGTIME = this.ultraCalendarMC_CHANGTIME.Text; IMC_CHECKCYCLE = this.ultraTextMC_CHECKCYCLE.Text; IMC_CHECKTIME = this.ultraCalendarMC_CHECKTIME.Text; IMC_CHANGCYCLE = this.ultraTextMC_CHANGCYCLE.Text; IAREA = this.ultraTextAREA.Text; CoreClientParam ccp2 = new CoreClientParam(); ccp2.ServerName = "UIK.UIK03.UIK030010"; ccp2.MethodName = "DoUpdate"; ccp2.ServerParams = new object[] { IMC_NAME, IMC_MODEL, IMC_SPEC, IMC_FACTORY, IMC_IN_DTIME, IMC_PRICE, IMC_CARE_SECTOR, IMC_NOM_CAP, IMC_UNIT, IMC_TAI, IMC_ACT, IMC_MFACTUR_UNITS, IMC_USE_YEAR, IMC_USE_TIME, IMC_INSTAL_LOCAL, IREG_IN_ID, reg_intime, IMC_STAT, IMAIN_MC_NAME, IMC_INSTAL_COUNT, IREQ_SPAR_COUNT, IREA_STO_CONUT, IMC_CHECKREASON, IMC_CHANGTIME, IMC_CHECKCYCLE, IMC_CHECKTIME, IMC_CHANGCYCLE, IAREA }; ccp2 = this.ExecuteNonQuery(ccp2, CoreInvokeType.Internal); if (0 != ccp2.ReturnCode) { MessageBox.Show("修改失败!"); } else { MessageBox.Show("修改成功!"); this.ultraTextMCID2.Enabled = true; this.ultraTextMCID2.Clear(); this.ultraTextMC_NAME.Clear(); this.ultraTextMC_MODEL.Clear(); this.ultraTextMC_SPEC.Clear(); this.ultraTextMC_FACTORY.Clear(); this.ultraCalendarMC_IN_DTIME.Text = ""; this.ultraCalendarMC_USE_TIME.Text = ""; this.ultraTextMC_PRICE.Clear(); this.ultraTextMC_CARE_SECTOR.Clear(); this.ultraTextMC_NOM_CAP.Clear(); this.ultraTextMC_UNIT.Clear(); this.ultraTextMC_ACT.Clear(); this.ultraTextMC_TAI.Clear(); this.ultraTextMC_MFACTUR_UNITS.Clear(); this.ultraTextMC_USE_YEAR.Clear(); this.ultraTextMC_INSTAL_LOCAL.Clear(); this.ultraTextREG_IN_ID.Clear(); this.ultraComboMC_STAT.Clear(); this.ultraTextMAIN_MC_NAME.Clear(); this.ultraTextMC_INSTAL_COUNT.Clear(); this.ultraTextREQ_SPAR_COUNT.Clear(); this.ultraTextREA_STO_CONUT.Clear(); this.ultraTextMC_CHECKREASON.Clear(); this.ultraCalendarMC_CHANGTIME.Text = ""; this.ultraTextMC_CHECKCYCLE.Clear(); this.ultraCalendarMC_CHECKTIME.Text = ""; this.ultraTextMC_CHANGCYCLE.Clear(); this.ultraTextAREA.Clear(); } } else { MessageBox.Show("请选择修改行!"); } } catch (Exception Ex) { MessageBox.Show(Ex.ToString()); } } } private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { if (e.Cell.Column.Key == "SELECT_ITEM") { if (e.Cell.Text == "True") { string mcid, IREG_IN_DTIME; ultraTextMCID2.Text = e.Cell.Row.Cells["MC_ID"].Text; // string mcid, IMC_NAME, IMC_MODEL, IMC_SPEC, IMC_FACTORY, IMC_IN_DTIME, IMC_PRICE, IMC_CARE_SECTOR, IMC_NOM_CAP, IMC_UNIT, IMC_TAI, IMC_ACT, IMC_MFACTUR_UNITS, IMC_USE_YEAR, IMC_USE_TIME, IMC_INSTAL_LOCAL, IREG_IN_ID, IREG_IN_DTIME, IMC_STAT; this.ultraTextMCID2.Text = e.Cell.Row.Cells["MC_ID"].Text; mcid = e.Cell.Row.Cells["MC_ID"].Text; IREG_IN_DTIME = e.Cell.Row.Cells["REG_IN_DTIME"].Text; this.ultraTextMCID2.Enabled = false; DataTable dt = new DataTable(); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIK.UIK03.UIK030010"; ccp.MethodName = "DoSelect"; ccp.ServerParams = new object[] { IREG_IN_DTIME }; ccp.SourceDataTable = dt; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); foreach (DataRow dr in dt.Rows) { this.ultraTextMC_NAME.Text = dr["MC_NAME"].ToString(); this.ultraTextMC_MODEL.Text = dr["MC_MODEL"].ToString(); this.ultraTextMC_SPEC.Text = dr["MC_SPEC"].ToString(); this.ultraTextMC_FACTORY.Text = dr["MC_FACTORY"].ToString(); this.ultraCalendarMC_IN_DTIME.Text = dr["MC_IN_DTIME"].ToString(); this.ultraCalendarMC_USE_TIME.Text = dr["MC_USE_TIME"].ToString(); this.ultraTextMC_PRICE.Text = dr["MC_PRICE"].ToString(); this.ultraTextMC_CARE_SECTOR.Text = dr["MC_CARE_SECTOR"].ToString(); this.ultraTextMC_NOM_CAP.Text = dr["MC_NOM_CAP"].ToString(); this.ultraTextMC_UNIT.Text = dr["MC_UNIT"].ToString(); this.ultraTextMC_ACT.Text = dr["MC_ACT"].ToString(); this.ultraTextMC_TAI.Text = dr["MC_TAI"].ToString(); this.ultraTextMC_MFACTUR_UNITS.Text = dr["MC_MFACTUR_UNITS"].ToString(); this.ultraTextMC_USE_YEAR.Text = dr["MC_USE_YEAR"].ToString(); this.ultraTextMC_INSTAL_LOCAL.Text = dr["MC_INSTAL_LOCAL"].ToString(); this.ultraTextREG_IN_ID.Text = dr["REG_IN_ID"].ToString(); this.ultraComboMC_STAT.Text = dr["MC_STAT"].ToString(); this.ultraTextMAIN_MC_NAME.Text = dr["MAIN_MC_NAME"].ToString(); this.ultraTextMC_INSTAL_COUNT.Text = dr["MC_INSTAL_COUNT"].ToString(); this.ultraTextREQ_SPAR_COUNT.Text = dr["REQ_SPAR_COUNT"].ToString(); this.ultraTextREA_STO_CONUT.Text = dr["REA_STO_CONUT"].ToString(); this.ultraTextMC_CHECKREASON.Text = dr["MC_CHECKREASON"].ToString(); this.ultraCalendarMC_CHANGTIME.Text = dr["MC_CHANGTIME"].ToString(); this.ultraTextMC_CHECKCYCLE.Text = dr["MC_CHECKCYCLE"].ToString(); this.ultraCalendarMC_CHECKTIME.Text = dr["MC_CHECKTIME"].ToString(); this.ultraTextMC_CHANGCYCLE.Text = dr["MC_CHANGCYCLE"].ToString(); this.ultraTextAREA.Text = dr["AREA"].ToString(); } } else { this.ultraTextMCID2.Enabled = true; this.ultraTextMCID2.Clear(); this.ultraTextMC_NAME.Clear(); this.ultraTextMC_MODEL.Clear(); this.ultraTextMC_SPEC.Clear(); this.ultraTextMC_FACTORY.Clear(); this.ultraCalendarMC_IN_DTIME.Text = ""; this.ultraCalendarMC_USE_TIME.Text = ""; this.ultraTextMC_PRICE.Clear(); this.ultraTextMC_CARE_SECTOR.Clear(); this.ultraTextMC_NOM_CAP.Clear(); this.ultraTextMC_UNIT.Clear(); this.ultraTextMC_ACT.Clear(); this.ultraTextMC_TAI.Clear(); this.ultraTextMC_MFACTUR_UNITS.Clear(); this.ultraTextMC_USE_YEAR.Clear(); this.ultraTextMC_INSTAL_LOCAL.Clear(); this.ultraTextREG_IN_ID.Clear(); this.ultraComboMC_STAT.Clear(); this.ultraTextMAIN_MC_NAME.Clear(); this.ultraTextMC_INSTAL_COUNT.Clear(); this.ultraTextREQ_SPAR_COUNT.Clear(); this.ultraTextREA_STO_CONUT.Clear(); this.ultraTextMC_CHECKREASON.Clear(); this.ultraCalendarMC_CHANGTIME.Text = ""; this.ultraTextMC_CHECKCYCLE.Clear(); this.ultraCalendarMC_CHECKTIME.Text = ""; this.ultraTextMC_CHANGCYCLE.Clear(); this.ultraTextAREA.Clear(); } } } private void DoInsert() { if (MessageBox.Show("您确认要插入新的入库信息吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes) { string mcid, IMC_NAME, IMC_MODEL, IMC_SPEC, IMC_FACTORY, IMC_IN_DTIME, IMC_PRICE, IMC_CARE_SECTOR, IMC_NOM_CAP, IMC_UNIT, IMC_TAI, IMC_ACT, IMC_MFACTUR_UNITS, IMC_USE_YEAR, IMC_USE_TIME, IMC_INSTAL_LOCAL, IREG_IN_ID, IREG_IN_DTIME, IMC_STAT, IMAIN_MC_NAME, IMC_INSTAL_COUNT, IREQ_SPAR_COUNT, IREA_STO_CONUT, IMC_CHECKREASON, IMC_CHANGTIME, IMC_CHECKCYCLE, IMC_CHECKTIME, IMC_CHANGCYCLE, IAREA; mcid = this.ultraTextMCID2.Text; IMC_NAME = this.ultraTextMC_NAME.Text; IMC_MODEL = this.ultraTextMC_MODEL.Text; IMC_SPEC = this.ultraTextMC_SPEC.Text; IMC_FACTORY = this.ultraTextMC_FACTORY.Text; IMC_IN_DTIME = this.ultraCalendarMC_IN_DTIME.Text; IMC_USE_TIME = this.ultraCalendarMC_USE_TIME.Text; IREG_IN_DTIME = DateTime.Now.ToString(); IMC_PRICE = this.ultraTextMC_PRICE.Text; IMC_CARE_SECTOR = this.ultraTextMC_CARE_SECTOR.Text; IMC_NOM_CAP = this.ultraTextMC_NOM_CAP.Text; IMC_UNIT = this.ultraTextMC_UNIT.Text; IMC_ACT = this.ultraTextMC_ACT.Text; IMC_TAI = this.ultraTextMC_TAI.Text; IMC_MFACTUR_UNITS = this.ultraTextMC_MFACTUR_UNITS.Text; IMC_USE_YEAR = this.ultraTextMC_USE_YEAR.Text; IMC_INSTAL_LOCAL = this.ultraTextMC_INSTAL_LOCAL.Text; IREG_IN_ID = this.ultraTextREG_IN_ID.Text; IMC_STAT = this.ultraComboMC_STAT.Text; IAREA = this.ultraTextAREA.Text; DataTable dt = new DataTable(); CoreClientParam ccp = new CoreClientParam(); IMAIN_MC_NAME = this.ultraTextMAIN_MC_NAME.Text; IMC_INSTAL_COUNT = this.ultraTextMC_INSTAL_COUNT.Text; IREQ_SPAR_COUNT = this.ultraTextREQ_SPAR_COUNT.Text; IREA_STO_CONUT = this.ultraTextREA_STO_CONUT.Text; IMC_CHECKREASON = this.ultraTextMC_CHECKREASON.Text; IMC_CHANGTIME = this.ultraCalendarMC_CHANGTIME.Text; IMC_CHECKCYCLE = this.ultraTextMC_CHECKCYCLE.Text; IMC_CHECKTIME = this.ultraCalendarMC_CHECKTIME.Text; IMC_CHANGCYCLE = this.ultraTextMC_CHANGCYCLE.Text; ccp.ServerName = "UIK.UIK03.UIK030010"; ccp.MethodName = "DoSelect"; ccp.ServerParams = new object[] { IREG_IN_DTIME }; ccp.SourceDataTable = dt; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); if (dt.Rows.Count > 0) { MessageBox.Show("该时间下设备已经录入,请重新输入"); } else { CoreClientParam ccp2 = new CoreClientParam(); ccp2.ServerName = "UIK.UIK03.UIK030010"; ccp2.MethodName = "DoInsert"; ccp2.ServerParams = new object[] { mcid, IMC_NAME, IMC_MODEL, IMC_SPEC, IMC_FACTORY, IMC_IN_DTIME, IMC_PRICE, IMC_CARE_SECTOR, IMC_NOM_CAP, IMC_UNIT, IMC_TAI, IMC_ACT, IMC_MFACTUR_UNITS, IMC_USE_YEAR, IMC_USE_TIME, IMC_INSTAL_LOCAL, IREG_IN_ID, IREG_IN_DTIME, IMC_STAT, IMAIN_MC_NAME, IMC_INSTAL_COUNT, IREQ_SPAR_COUNT, IREA_STO_CONUT, IMC_CHECKREASON, IMC_CHANGTIME, IMC_CHECKCYCLE, IMC_CHECKTIME, IMC_CHANGCYCLE, IAREA }; ccp2 = this.ExecuteNonQuery(ccp2, CoreInvokeType.Internal); if (0 != ccp2.ReturnCode) { MessageBox.Show("添加失败!"); } else { MessageBox.Show("添加成功!"); this.ultraTextMCID2.Enabled = true; this.ultraTextMCID2.Clear(); this.ultraTextMC_NAME.Clear(); this.ultraTextMC_MODEL.Clear(); this.ultraTextMC_SPEC.Clear(); this.ultraTextMC_FACTORY.Clear(); this.ultraCalendarMC_IN_DTIME.Text = ""; this.ultraCalendarMC_USE_TIME.Text = ""; this.ultraTextMC_PRICE.Clear(); this.ultraTextMC_CARE_SECTOR.Clear(); this.ultraTextMC_NOM_CAP.Clear(); this.ultraTextMC_UNIT.Clear(); this.ultraTextMC_ACT.Clear(); this.ultraTextMC_TAI.Clear(); this.ultraTextMC_MFACTUR_UNITS.Clear(); this.ultraTextMC_USE_YEAR.Clear(); this.ultraTextMC_INSTAL_LOCAL.Clear(); this.ultraTextREG_IN_ID.Clear(); this.ultraComboMC_STAT.Clear(); this.ultraTextMAIN_MC_NAME.Clear(); this.ultraTextMC_INSTAL_COUNT.Clear(); this.ultraTextREQ_SPAR_COUNT.Clear(); this.ultraTextREA_STO_CONUT.Clear(); this.ultraTextMC_CHECKREASON.Clear(); this.ultraCalendarMC_CHANGTIME.Text = ""; this.ultraTextMC_CHECKCYCLE.Clear(); this.ultraCalendarMC_CHECKTIME.Text = ""; this.ultraTextMC_CHANGCYCLE.Clear(); this.ultraTextAREA.Clear(); } } } } //private void ultraGrid1_AfterRowActivate(object sender, EventArgs e) //{ // try // { // Infragistics.Win.UltraWinGrid.UltraGridRow ugr = this.ultraGrid1.ActiveRow; // if (ugr.Cells["SELECT_ITEM"].Value.ToString() == "True") // { // string mcid, IMC_NAME, IMC_MODEL, IMC_SPEC, IMC_FACTORY, IMC_IN_DTIME, IMC_PRICE, IMC_CARE_SECTOR, IMC_NOM_CAP, IMC_UNIT, IMC_TAI, IMC_ACT, IMC_MFACTUR_UNITS, IMC_USE_YEAR, IMC_USE_TIME, IMC_INSTAL_LOCAL, IREG_IN_ID, IREG_IN_DTIME, IMC_STAT; // this.ultraTextMCID2.Text = ugr.Cells["MC_ID"].Value.ToString(); // mcid = ugr.Cells["MC_ID"].Value.ToString(); // this.ultraTextMCID2.Enabled = false; // DataTable dt = new DataTable(); // CoreClientParam ccp = new CoreClientParam(); // ccp.ServerName = "UIK.UIK03.UIK030010"; // ccp.MethodName = "DoSelect"; // ccp.ServerParams = new object[] { mcid }; // ccp.SourceDataTable = dt; // this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); // foreach (DataRow dr in dt.Rows) // { // this.ultraTextMC_NAME.Text = dr["MC_NAME"].ToString(); // this.ultraTextMC_MODEL.Text = dr["MC_MODEL"].ToString(); // this.ultraTextMC_SPEC.Text = dr["MC_SPEC"].ToString(); // this.ultraTextMC_FACTORY.Text = dr["MC_FACTORY"].ToString(); // this.ultraCalendarMC_IN_DTIME.Text = dr["MC_IN_DTIME"].ToString(); // this.ultraCalendarMC_USE_TIME.Text = dr["MC_USE_TIME"].ToString(); // this.ultraCalendarREG_IN_DTIME.Text = dr["REG_IN_DTIME"].ToString(); // this.ultraTextMC_PRICE.Text = dr["MC_PRICE"].ToString(); // this.ultraTextMC_CARE_SECTOR.Text = dr["MC_CARE_SECTOR"].ToString(); // this.ultraTextMC_NOM_CAP.Text = dr["MC_NOM_CAP"].ToString(); // this.ultraTextMC_UNIT.Text = dr["MC_UNIT"].ToString(); // this.ultraTextMC_ACT.Text = dr["MC_ACT"].ToString(); // this.ultraTextMC_TAI.Text = dr["MC_TAI"].ToString(); // this.ultraTextMC_MFACTUR_UNITS.Text = dr["MC_MFACTUR_UNITS"].ToString(); // this.ultraTextMC_USE_YEAR.Text = dr["MC_USE_YEAR"].ToString(); // this.ultraTextMC_INSTAL_LOCAL.Text = dr["MC_INSTAL_LOCAL"].ToString(); // this.ultraTextREG_IN_ID.Text = dr["REG_IN_ID"].ToString(); // this.ultraComboMC_STAT.Text = dr["MC_STAT"].ToString(); // } // if (mcid != "") // { // MessageBox.Show("在编辑区修改单元格!"); // } // //IMC_NAME = this.ultraTextMC_NAME.Text; // //IMC_MODEL = this.ultraTextMC_MODEL.Text; // //IMC_SPEC = this.ultraTextMC_SPEC.Text; // //IMC_FACTORY = this.ultraTextMC_FACTORY.Text; // //IMC_IN_DTIME = this.ultraCalendarMC_IN_DTIME.Text; // //IMC_USE_TIME = this.ultraCalendarMC_USE_TIME.Text; // //IREG_IN_DTIME = this.ultraCalendarREG_IN_DTIME.Text; // //IMC_PRICE = this.ultraTextMC_PRICE.Text; // //IMC_CARE_SECTOR = this.ultraTextMC_CARE_SECTOR.Text; // //IMC_NOM_CAP = this.ultraTextMC_NOM_CAP.Text; // //IMC_UNIT = this.ultraTextMC_UNIT.Text; // //IMC_ACT = this.ultraTextMC_ACT.Text; // //IMC_TAI = this.ultraTextMC_TAI.Text; // //IMC_MFACTUR_UNITS = this.ultraTextMC_MFACTUR_UNITS.Text; // //IMC_USE_YEAR = this.ultraTextMC_USE_YEAR.Text; // //IMC_INSTAL_LOCAL = this.ultraTextMC_INSTAL_LOCAL.Text; // //IREG_IN_ID = this.ultraTextREG_IN_ID.Text; // //IMC_STAT = this.ultraComboMC_STAT.Text; // //CoreClientParam ccp2 = new CoreClientParam(); // //ccp2.ServerName = "UIK.UIK03.UIK030010"; // //ccp2.MethodName = "DoUpdate"; // //ccp2.ServerParams = new object[] { mcid, IMC_NAME, IMC_MODEL, IMC_SPEC, IMC_FACTORY, IMC_IN_DTIME, IMC_PRICE, IMC_CARE_SECTOR, IMC_NOM_CAP, IMC_UNIT, IMC_TAI, IMC_ACT, IMC_MFACTUR_UNITS, IMC_USE_YEAR, IMC_USE_TIME, IMC_INSTAL_LOCAL, IREG_IN_ID, IREG_IN_DTIME, IMC_STAT }; // //ccp2 = this.ExecuteNonQuery(ccp2, CoreInvokeType.Internal); // //if (0 != ccp2.ReturnCode) // //{ // // MessageBox.Show("修改失败!"); // //} // //else // //{ // // MessageBox.Show("修改成功!"); // //} // } // else // { // MessageBox.Show("请选择修改行!"); // } // } // catch (Exception Ex) // { // MessageBox.Show(Ex.ToString()); // } //} } }