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.LZMes.Client.UIE;
using System.Collections;
namespace Core.LZMes.Client.UIM
{
public partial class UIM010310 : FrmBase
{
public UIM010310()
{
InitializeComponent();
}
private void init()
{
string commCodeCd = "M01001";
DataTable dt = new DataTable();
CoreClientParam ccp = new CoreClientParam();
ccp.ServerName = "UIB.COM.ComDBQuery";
ccp.MethodName = "doSimpleQuery";
System.Collections.ArrayList paramArray = new System.Collections.ArrayList();
paramArray.Add("UIECOMM00_SELECT.COMM_CODE");
paramArray.Add(commCodeCd);
ccp.ServerParams = new object[] { paramArray };
ccp.SourceDataTable = dt;
this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
Core.LZMes.Client.UIE.UIE041.UIEBase.Init_ComboControl(this.ComboOrdProc, ref dt, "M01001");
}
public override void ToolBar_Click(object sender, string ToolbarKey)
{
switch (ToolbarKey)
{
case "Query":
this.DoQuery();
break;
case "Save":
this.DoSave();
break;
}
}
///
/// 查询待入库钢卷
///
private void DoQuery()
{
try
{
this.dataSet1.Tables[0].Clear();
string procuctedTime = ultraDateTimeEditor1.Value != null ? ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") : "";
string coilNo = textBox9.Text.Trim();
CoreClientParam ccp = new CoreClientParam();
ccp.ServerName = "UIB.COM.ComDBQuery";
ccp.MethodName = "doSimpleQuery";
System.Collections.ArrayList paramArray = new System.Collections.ArrayList();
paramArray.Add("UIM010290_01.SELECT");
paramArray.Add(procuctedTime);
paramArray.Add(coilNo);
ccp.ServerParams = new object[] { paramArray };
ccp.SourceDataTable = this.dataSet1.Tables[0];
this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
textBox1.Text = "";
}
catch (Exception EX)
{
MessageBox.Show(EX.ToString());
}
}
///
/// 成品库钢卷入库
///
private void DoSave()
{
if (this.textBox3.Text.Equals("1"))
{
if (MessageBox.Show("即将操作的钢卷为订单材,确认进行异常处置?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
}
string entryShift = UserInfo.GetUserOrder();//入库班次
string entryGroup = UserInfo.GetUserGroup();//入库班组
string reg_id = UserInfo.GetUserID();//操作人
string mdType = Common.FixDBManager.CheckNullStr(Convert.ToString(this.ComboOrdProc.Value));//操作类型
string coilno = Common.FixDBManager.CheckNullStr(Convert.ToString(this.textBox1.Text));//操作类型
string fbreason = Common.FixDBManager.CheckNullStr(Convert.ToString(this.textBox2.Text));//封闭原因
string msg = "";
Hashtable paramHsmp = new Hashtable();
paramHsmp.Add("i1", reg_id);
paramHsmp.Add("i2", entryShift);
paramHsmp.Add("i3", entryGroup);
paramHsmp.Add("i4", mdType);
paramHsmp.Add("i5", coilno);
paramHsmp.Add("i6", fbreason);
paramHsmp.Add("o7", msg);
CoreClientParam ccp = new CoreClientParam();
ccp.ServerName = "UIB.COM.ComDBProcedure";
ccp.MethodName = "doXmlProcedure";
ccp.ServerParams = new object[] { "UIM010290_01.CALL", paramHsmp };
ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
if (0 == ccp.ReturnCode)
{
MessageBox.Show("操作成功!");
}
DoQuery();
}
private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{
}
private void UIM010290_Load(object sender, EventArgs e)
{
init();
}
private void ultraGrid1_DoubleClickCell(object sender, Infragistics.Win.UltraWinGrid.DoubleClickCellEventArgs e)
{
this.textBox1.Text = e.Cell.Row.Cells["COIL_NO"].Value.ToString();
this.textBox3.Text = e.Cell.Row.Cells["ORD_FL"].Value.ToString();
}
}
}