/*******************************************************************************
* Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
* 类的信息:
* 1.程序名称:F_RPT_080111.cs
* 2.功能描述:产品装配编辑
* 编辑履历:
* 作者 日期 版本 修改内容
* 秦祺 2022/12/9 1.00 新建
*******************************************************************************/
using System;
using System.Data;
using System.Windows.Forms;
using Dongke.IBOSS.PRD.Basics.BaseResources;
using Dongke.IBOSS.PRD.Client.CommonModule;
using Dongke.IBOSS.PRD.Client.Controls;
using Dongke.IBOSS.PRD.WCF.DataModels;
using Dongke.IBOSS.PRD.WCF.Proxys;
namespace Dongke.IBOSS.PRD.Client.PMModule
{
///
/// 成品检验-新增、编辑
///
public partial class F_RPT_080111 : DKDockPanelBase
{
#region 成员变量
#endregion
#region 构造函数
///
///
///
public F_RPT_080111()
{
InitializeComponent();
this.btnSave.Text = ButtonText.BTN_SAVE;
this.btnCancel.Text = ButtonText.BTN_CLOSE;
}
#endregion
#region 属性
public DataRow DrValue
{
set;
get;
}
#endregion
#region 事件
///
/// 窗体加载事件
///
///
///
private void F_PM_1203_Load(object sender, EventArgs e)
{
this.txtBarCode.Text = DrValue["BARCODE"] + "";
this.txtIdnrk.Text = DrValue["IDNRK"] + "";
this.txtIdnrkName.Text = DrValue["IDNRKNAME"] + "";
this.txtMatnr.Text = DrValue["MATNR"] + "";
this.txtMeins.Text = DrValue["MEINS"] + "";
this.txtIdnrkOnlyCode.Text = DrValue["IDNRKONLYCODE"] + "";
}
///
/// 保存按钮事件
///
///
///
private void btnSave_Click(object sender, EventArgs e)
{
try
{
//保存
ClientRequestEntity cre = new ClientRequestEntity();
cre.NameSpace = "F_RPT_080111";
cre.Name = "SaveIdnrkOnlyCode";
cre.Properties["RelationID"] = DrValue["RELATIONID"];
cre.Properties["IdnrkOnlyCode"] = this.txtIdnrkOnlyCode.Text.Trim();
ServiceResultEntity sre = DoAsync(() =>
{
return PCModuleProxyNew.Service.HandleRequest(cre);
});
if (sre.OtherStatus > 0)
{
// 提示信息
MessageBox.Show(string.Format(Messages.MSG_CMN_I001, "组件唯一编码", "保存"),
this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
this.DialogResult = DialogResult.OK;
this.Close();
}
}
catch (Exception ex)
{
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 关闭按钮事件
///
///
///
private void btnCancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
#endregion
}
}