| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- 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.UIM
- {
- public partial class UIM070060 : FrmBase
- {
- public UIM070060()
- {
- InitializeComponent();
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.DoQuery();
- break;
- case "Export":
- this.Export();
- break;
-
- case "Save":
- this.DoSave();
- break;
- }
- }
- /// <summary>
- /// 查询原料库库存数据
- /// </summary>
- private void DoQuery()
- {
- try
- {
-
- this.dataSet1.Tables[0].Clear();
-
- string startTime = this.ultraDateTimeEditor1.Value != null ? ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") : "";//入库开始时间
- string endTime = this.ultraDateTimeEditor2.Value != null ? ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") : "";//入库结束时间
- string coil_no = this.textBox1.Text;
- string ord_no = this.textBox2.Text;
- string[] queryParams = new string[] { startTime, endTime, coil_no, ord_no };
- List<string[]> list = new List<String[]>();
- list.Add(queryParams);
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "UIM.UIM07.UIM070010";
- ccp.MethodName = "queryHYardSpmdETAL";
- ccp.ServerParams = new object[] { list };
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
-
-
- }
-
-
-
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
-
- }
- /// <summary>
- /// 导出EXCEL
- /// </summary>
- private void Export()
- {
- try
- {
- if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
- {
- string fileName = this.saveFileDialog1.FileName;
- this.ultraGridExcelExporter1.Export(ultraGrid3, fileName);
- System.Diagnostics.Process.Start(fileName);
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.ToString());
- }
- }
- private void UIM070060_Load(object sender, EventArgs e)
- {
- this.ultraDateTimeEditor1.Value = "" ;
- this.ultraDateTimeEditor2.Value = "";
-
- }
- private void DoSave()
- {
- Infragistics.Win.UltraWinGrid.RowsCollection rs = null;
- ArrayList list = new ArrayList();
- string[] param = null;
- CoreClientParam ccp = new CoreClientParam();
- rs = this.ultraGrid1.Rows;
- for (int i = 0; i < rs.Count; i++)
- {
- if ("TRUE".Equals(rs[i].Cells["CHK"].Text.ToUpperInvariant()))
- {
- param = new string[2];
- param[0] = rs[i].Cells["LZBZ"].Text.ToString().Trim();
- param[1] = rs[i].Cells["OLD_SAMPL_NO"].Value.ToString().Trim();
- list.Add(param);
- }
- }
- ccp.ServerName = "UIM.UIM070060";
- ccp.MethodName = "addLzbz";
- ccp.ServerParams = new Object[] { list };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- }
-
- }
- }
|