| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- 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();
-
- }
-
- /// <summary>
- /// 初始化控件
- /// </summary>
- private void InitCol()
- {
- QueryQcmAddAsk();
- }
- /// <summary>
- /// 查询附加要求信息
- /// </summary>
- /// <param name="JudgeStoveNo"></param>
- private void QueryQcmAddAsk()
- {
- List<QcmAddAskEntity> 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<QcmAddAskEntity>(
- "com.steering.mes.signature.FrmInOnlineStore.QueryQcmAddAsk", new object[] { _JugdeApplyCode, _JudgeStoveNo }, this._ob);
- qcmAddAskEntityBindingSource.DataSource = listSource;
- }
- else
- {
- listSource = EntityHelper.GetData<QcmAddAskEntity>(
- "com.steering.mes.signature.FrmInOnlineStore.QueryQcmAddAsk", new object[] { _ProOrderNo }, this._ob);
- qcmAddAskEntityBindingSource.DataSource = listSource;
- }
- }
- /// <summary>
- /// 确认
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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();
- }
-
- /// <summary>
- /// 取消
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnCancel_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- private void FrmQcmAddAsk_Load(object sender, EventArgs e)
- {
- EntityHelper.ShowGridCaption<QcmAddAskEntity>(ultraGrid3.DisplayLayout.Bands[0]);
- }
- }
- }
|