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.Mes.Client.Comm.Server; using Core.Mes.Client.Comm.Control; using Infragistics.Win.UltraWinGrid; using Infragistics.Win; using com.steering.mes.zgmil.entity; using System.Collections; using Core.Mes.Client.Comm.Tool; using Core.StlMes.Client.ZGMil.Entity; using Core.Mes.Client.Comm.Format; namespace Core.StlMes.Client.ZGMil.Popup { public partial class FrmQcmAddAsk : FrmBase { private string _JugdeApplyCode = ""; private string _JudgeStoveNo = ""; private string _ProOrderNo = ""; private string User = ""; private DataTable _dtMatList = null; private OpeBase _ob = null; public FrmQcmAddAsk(string jugdeApplyCode, string judgeStoveNo, string ordenNo, OpeBase ob) { InitializeComponent(); _JugdeApplyCode = jugdeApplyCode; _JudgeStoveNo = judgeStoveNo; _ProOrderNo = ordenNo; _ob = ob; InitCol(); } /// /// 初始化控件 /// private void InitCol() { QueryQcmAddAsk(); } /// /// 查询附加要求信息 /// /// private void QueryQcmAddAsk() { List listSource = null; DataTable dt = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.QueryQcmAddAsk", new object[] { _JugdeApplyCode,_JudgeStoveNo }, this._ob); if (dt.Rows.Count > 0 && dt != null) { listSource = EntityHelper.GetData( "com.steering.mes.signature.FrmInOnlineStore.QueryQcmAddAsk", new object[] { _JugdeApplyCode, _JudgeStoveNo }, this._ob); qcmAddAskEntityBindingSource.DataSource = listSource; } else { listSource = EntityHelper.GetData( "com.steering.mes.signature.FrmInOnlineStore.QueryQcmAddAsk", new object[] { _ProOrderNo }, this._ob); qcmAddAskEntityBindingSource.DataSource = listSource; } } /// /// 确认 /// /// /// private void btnOK_Click(object sender, EventArgs e) { this.ultraGrid3.UpdateData(); ArrayList arrayList = new ArrayList(); for (int i = 0; i < ultraGrid3.Rows.Count; i++) { QcmAddAskEntity ParmEntity = new QcmAddAskEntity(); ParmEntity = (QcmAddAskEntity)this.ultraGrid3.Rows[i].ListObject; ParmEntity.JugdeApplyCode = _JugdeApplyCode; ParmEntity.JudgeStoveNo = _JudgeStoveNo; ParmEntity.ComfrimName = this.UserInfo.GetUserName(); arrayList.Add(JSONFormat.Format(ParmEntity)); } int count2 = ServerHelper.SetData("com.steering.mes.signature.FrmInOnlineStore.insertQcmAddAsk", new object[] { arrayList }, this._ob); if (count2 > 0) { this.DialogResult = System.Windows.Forms.DialogResult.OK; } MessageUtil.ShowTips("确认成功!"); this.Close(); } /// /// 取消 /// /// /// private void btnCancel_Click(object sender, EventArgs e) { this.Close(); } private void FrmQcmAddAsk_Load(object sender, EventArgs e) { EntityHelper.ShowGridCaption(ultraGrid3.DisplayLayout.Bands[0]); } } }