| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- 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.UIE
- {
- public partial class UIE041101 : FrmBase
- {
- public UIE041101()
- {
- InitializeComponent();
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.DoQuery();
- break;
- case "Save":
- this.DoSave();
- break;
- }
- }
- public void DoQuery()
- {
- try
- {
- if (this.textBox1.Text.Trim() == "") return;
- ArrayList al = new ArrayList();
- al.Add("UIE041101.SELECT");
- al.Add(this.textBox1.Text.Trim());
- al.Add(this.textBox2.Text.Trim());
- this.dataSet1.Tables[0].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "UIB.COM.ComDBQuery";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { al };
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- public void DoSave()
- {
- try
- {
- if (MessageBox.Show("确定修改?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
- return;
- if (this.ultraGrid1.ActiveRow == null)
- return;
- string ordProg = "";
- string ordDelDate = "";
- string ordPlanDate="";
- if (this.ultraComboEditor1.Value != null)//进程状态
- {
- ordProg = this.ultraComboEditor1.Value.ToString().Trim();
- }
- if (this.ultraDateTimeEditor1.Value != null)//交货期
- {
- ordDelDate = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd");
- }
- if(this.ultraDateTimeEditor2.Value != null)//预排期
- {
- ordPlanDate=this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd");
- }
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i1", this.ultraGrid1.ActiveRow.Cells["ORD_NO"].Text);//合同号
- ht.Add("i2", this.ultraGrid1.ActiveRow.Cells["ORD_SEQ"].Text);//行号
- ht.Add("i3", ordProg);//进程状态
- ht.Add("i4", this.textBox3.Text.Trim());//重量下限
- ht.Add("i5", this.textBox4.Text.Trim());//重量上限
- ht.Add("i6", ordDelDate);
- ht.Add("i7", this.textBox5.Text.Trim());//单重下限
- ht.Add("i8", this.textBox6.Text.Trim());//单重上限
- ht.Add("i9", ordPlanDate);
- ht.Add("i10", this.comboBox1.SelectedIndex.ToString());//修改类型
- ht.Add("o11" , "");
- ccp.ServerName = "UIB.COM.ComDBProcedure";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIE041101.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.DoQuery();
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
- {
- try
- {
- if (this.ultraGrid1.ActiveRow == null)
- return;
- this.ultraComboEditor1.Text = "";// this.ultraGrid1.ActiveRow.Cells["ORD_PROG_CD"].Text;//进程状态
- this.textBox3.Text = "";//this.ultraGrid1.ActiveRow.Cells["WGT_ACVAL_MIN"].Text;//订单重量下限
- this.textBox4.Text = "";//this.ultraGrid1.ActiveRow.Cells["WGT_ACVAL_MAX"].Text;//订单重量上限
- this.textBox5.Text = "";//this.ultraGrid1.ActiveRow.Cells["ORD_UNIT_WGT_MIN"].Text;//订单单重下限
- this.textBox6.Text = "";//this.ultraGrid1.ActiveRow.Cells["ORD_UNIT_WGT_MAX"].Text;//订单单重上限
- this.ultraDateTimeEditor1.Value = "";
- this.ultraDateTimeEditor2.Value = "";
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void UIE041101_Load(object sender, EventArgs e)
- {
- this.comboBox1.SelectedIndex = 0;
- }
- }
- }
|