using DevExpress.XtraEditors; using System; using ZJ_BYD.Common; using ZJ_BYD.DB; using ZJ_BYD.Untils; namespace ZJ_BYD { public partial class BindOrder : XtraForm { public delegate void ChangeOrderCodeHandler(string code); public event ChangeOrderCodeHandler ChangeOrderCode; public BindOrder() { InitializeComponent(); } private void btnOk_Click(object sender, EventArgs e) { var mskCode = MskCodeHelper.QueryMask_code(Program.ActiveStatinCode); var orderNo = txtOrderNo.Text.Trim(); if (!string.IsNullOrWhiteSpace(orderNo)) { ChangeOrderCode(orderNo); var mesResult = RequestMes.BindOrder(mskCode.Site, mskCode.Resource, CurrentUser.UserName, CurrentUser.PassWord, orderNo); LogHelper.WriteLog($"工单{orderNo}绑定成功!MES返回结果:{mesResult.msg}"); this.Close(); } } private void btnCancel_Click(object sender, EventArgs e) { this.Close(); } } }