| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Tool;
- using CoreFS.CA06;
- namespace Core.StlMes.Client.Lims.Data.PipeAndOutdec
- {
- public partial class FrmCheckConsignBaseInfo : FrmBase
- {
- public FrmCheckConsignBaseInfo()
- {
- InitializeComponent();
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "doQuery":
- doQuery();
- break;
- case "doUpdate":
- doUpdate();
- break;
- case "Close":
- this.Close();
- break;
- }
- }
- /// <summary>
- /// 查询
- /// </summary>
- public void doQuery()
- {
- string checkNo = ""; //检验编号
- string heatNo = ""; //炉号
- if (uchkCheckNo.Checked)
- {
- checkNo = txtCheckNo.Text.Trim();
- }
- if (uchkHeatNo.Checked)
- {
- heatNo = txtHeatNo.Text.Trim();
- }
- if (checkNo.Equals("")&& heatNo.Equals("")) {
- MessageUtil.ShowTips("请输入检验编号或炉号查询!");
- return;
- }
- DataTable dt = ServerHelper.GetData("com.steering.lims.data.pipe.FrmCheckConsignBaseInfo.doQuery", new Object[] { checkNo, heatNo}, this.ob);
- GridHelper.CopyDataToDatatable(ref dt, ref this.dataTable1, true);
- }
- /// <summary>
- /// 修改
- /// </summary>
- public void doUpdate()
- {
- try
- {
- ultraGrid1.Update();
- if (ultraGrid1.ActiveRow == null)
- {
- MessageUtil.ShowTips("请选择需要修改的数据!");
- return;
- }
- String craftSource = ultraGrid1.ActiveRow.Cells["CRAFT_SOURCE"].Value.ToString();
- if (!craftSource.Equals("生产样") && !craftSource.Equals("首日样"))
- {
- MessageUtil.ShowTips("改数据非生产样,不能修改!");
- return;
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否确定修改?") == DialogResult.No)
- {
- return;
- }
- ArrayList all = new ArrayList();
- String checkNo = ultraGrid1.ActiveRow.Cells["CHECK_NO"].Value.ToString();
- all.Add(checkNo);
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.lims.data.pipe.FrmCheckConsignBaseInfo";
- ccp.MethodName = "doUpdate";
- ccp.ServerParams = new object[] { all };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1) return;
- MessageBox.Show("修改成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- doQuery();
- }
- catch (System.Exception ex)
- {
- MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- }
- }
- private void FrmCheckConsignBaseInfo_Load(object sender, EventArgs e)
- {
-
- }
- }
- }
|