| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- using Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Tool;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinGrid;
- 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;
- namespace Core.StlMes.Client.Judge.Controls
- {
- public partial class ZbsChooseBillInfo : FrmBase
- {
- public ZbsChooseBillInfo(OpeBase ob)
- {
- this.ob = ob;
- InitializeComponent();
- doQuery();
- }
- /// <summary>
- /// 窗体关闭属性 默认关闭
- /// </summary>
- private string closeEvent = "formClose";
- /// <summary>
- /// 窗体关闭属性
- /// </summary>
- public string CloseEvent
- {
- get { return closeEvent; }
- set { closeEvent = value; }
- }
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key)
- {
- case "Query":
- doQuery();
- break;
- case "doConfirm":
- doConfirm();
- break;
- case "Close":
- this.Close();
- break;
- }
- }
- private void doQuery()
- {
- string billNo = "";
- string judgeNo = "";
- string orderStart = "";
- string orderEnd = "";
- if (chkBillNo.Checked)
- billNo = txtBillNo.Text.Trim();
- if (ckJudgeNo.Checked)
- judgeNo = utJudgeNo.Text.Trim();
- if (uchkDate.Checked)
- {
- orderStart = udtStart.DateTime.ToString("yyyy-MM-dd") + " 00:00:01";
- orderEnd = udtEnd.DateTime.ToString("yyyy-MM-dd") + " 23:59:59";
- }
- else
- {
- orderStart = "1000-01-01 00:00:01";
- orderEnd = "9999-12-31 23:59:59";
- }
- DataTable dt = ServerHelper.GetData("com.steering.pss.judge.DAL.ZbsInfoInput.getBillInfo", new Object[] { billNo, judgeNo, orderStart, orderEnd }, this.ob);
- GridHelper.CopyDataToDatatable(ref dt, ref this.dataTable1, true);
- GridHelper.RefreshAndAutoSize(this.ultraGrid1);
- }
- private void doConfirm()
- {
- if (ultraGrid1.ActiveRow == null)
- {
- MessageUtil.ShowWarning("请选择提单信息!");
- return;
- }
- ArrayList list = new ArrayList();
- UltraGridRow row = ultraGrid1.ActiveRow;
- list.Add("");
- list.Add(row.Cells["STOVE_NO"].Value.ToString());
- list.Add(row.Cells["JUDGE_STOVE_NO"].Value.ToString());
- list.Add(row.Cells["BATCH_NO"].Value.ToString());
- list.Add(row.Cells["PLINE_CODE"].Value.ToString());
- list.Add("40740101");
- list.Add("40740201");
- list.Add("40740601");
- list.Add("40740301");
- list.Add("40740401");
- list.Add("40740501");
- list.Add("40740801");
- list.Add("40740701");
- list.Add(UserInfo.GetUserName());
- list.Add(row.Cells["ACT_COUNT"].Value.ToString());
- list.Add(row.Cells["ACT_WEIGHT"].Value.ToString());
- list.Add(row.Cells["ACT_WEIGHT"].Value.ToString());
- list.Add(row.Cells["STEELCODE"].Value.ToString());
- list.Add(row.Cells["GRADECODE"].Value.ToString());
- list.Add(row.Cells["STEELNAME"].Value.ToString());
- list.Add(row.Cells["GRADENAME"].Value.ToString());
- list.Add(row.Cells["CUSTOMER_NO"].Value.ToString());
- list.Add(row.Cells["CUSTOMER_NM"].Value.ToString());
- list.Add(row.Cells["RECEIV_NO"].Value.ToString());
- list.Add(row.Cells["RECEIV_NM"].Value.ToString());
- list.Add(row.Cells["ORDER_NO"].Value.ToString());
- list.Add(row.Cells["ORDER_SEQ"].Value.ToString());
- list.Add(row.Cells["STD_CODE"].Value.ToString());
- list.Add(row.Cells["STD_NAME"].Value.ToString());
- list.Add(row.Cells["STD_STYLE"].Value.ToString());
- list.Add(row.Cells["STD_STYLE_DESC"].Value.ToString());
- list.Add(row.Cells["PRODUCCODE"].Value.ToString());
- list.Add(row.Cells["PRODUCNAME"].Value.ToString());
- list.Add(row.Cells["ORDER_SPEC_CODE"].Value.ToString());
- list.Add(row.Cells["ORDER_SPEC_DESC"].Value.ToString());
- list.Add(row.Cells["MODEL_CODE"].Value.ToString());
- list.Add(row.Cells["MODEL_DESC"].Value.ToString());
- list.Add(row.Cells["OUTPUT_STD_NO"].Value.ToString());
- list.Add(row.Cells["LEN_NO"].Value.ToString());
- list.Add(row.Cells["USE_CODE"].Value.ToString());
- list.Add(row.Cells["USE_DESC"].Value.ToString());
- list.Add(row.Cells["CUSTM_ORDER_NO"].Value.ToString());
- list.Add(row.Cells["SPEC_CODE"].Value.ToString());
- list.Add(row.Cells["SPEC_NAME"].Value.ToString());
- list.Add(row.Cells["LEN_UNIT"].Value.ToString());
- list.Add(row.Cells["LEN_MIN"].Value.ToString());
- list.Add(row.Cells["LEN_MAX"].Value.ToString());
- list.Add(row.Cells["LEN_DESC"].Value.ToString());
- list.Add(row.Cells["LEN_DESC"].Value.ToString());
- list.Add(row.Cells["ORD_LN_PK"].Value.ToString());
- list.Add(row.Cells["ORD_LN_DLY_PK"].Value.ToString());
- if (MessageUtil.ShowYesNoAndQuestion("是否确认新增质保书主信息?") == DialogResult.No) return;
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.pss.judge.DAL.ZbsInfoInput";
- ccp.MethodName = "addZbsInfo";
- ccp.ServerParams = new object[] { list, row.Cells["BILL_NO"].Value.ToString() };
- ccp.IfShowErrMsg = false;
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp != null)
- {
- if (ccp.ReturnCode == -1)
- {
- MessageUtil.ShowWarning(ccp.ReturnInfo);
- return;
- }
- MessageUtil.ShowTips("新增成功!");
- this.CloseEvent = "Add";
- this.Close();
- }
- else
- {
- return;
- }
- }
- private void ZbsChooseBillInfo_Load(object sender, EventArgs e)
- {
- //默认查询当前日期-1月——当前日期数据。
- udtStart.DateTime = Convert.ToDateTime(DateTime.Now.AddMonths(-1).ToShortDateString());
- udtEnd.DateTime = Convert.ToDateTime(DateTime.Now.ToShortDateString());
- }
- private void chkBillNo_CheckedChanged(object sender, EventArgs e)
- {
- if (chkBillNo.Checked)
- txtBillNo.ReadOnly = false;
- else
- txtBillNo.ReadOnly = true;
- }
- private void ckJudgeNo_CheckedChanged(object sender, EventArgs e)
- {
- if (ckJudgeNo.Checked)
- utJudgeNo.ReadOnly = false;
- else
- utJudgeNo.ReadOnly = true;
- }
- }
- }
|