/******************************************************************************* * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential * 类的信息: * 1.程序名称:F_PM_2102.cs * 2.功能描述:新增盘点单 * 编辑履历: * 作者 日期 版本 修改内容 * 王鑫 2015/05/13 1.00 新建 *******************************************************************************/ using System; using System.Data; using System.Reflection; using System.Text; using System.Windows.Forms; using Dongke.IBOSS.PRD.Basics.BaseControls; 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_PM_2109 : DKFormBase { #region 构造函数 public F_PM_2109() { InitializeComponent(); this.btnClose.Text = ButtonText.BTN_CLOSE; this.btnSave.Text = ButtonText.BTN_SAVE; } #endregion #region 事件 /// /// 关闭按钮事件 /// /// /// private void tsbtnClose_Click(object sender, EventArgs e) { this.Close(); } /// /// 窗体加载事件 /// /// /// private void F_PM_2102_Load(object sender, EventArgs e) { this.dtpUpdateTimeStart.Value = DateTime.Now.Date; this.dtpUpdateTimeEnd.Value = DateTime.Now.Date; } /// /// 保存按钮事件 /// /// /// private void btnSave_Click(object sender, EventArgs e) { try { DialogResult dialogResult = MessageBox.Show("确认是否清除符合条件的在产产品?", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialogResult.Equals(DialogResult.No)) { return; } RPT010401_SE se = new RPT010401_SE(); se.ProductionLineIDS = dkproductionLineSearchBox.ProductionLineIDS; se.ProcedureIDS = dkProcedureSearchBox.ProcedureIDS; se.UpdateTimeStart = DateTime.Parse(this.dtpUpdateTimeStart.Value.ToString("yyyy-MM-dd") + " 0:0:0"); se.UpdateTimeEnd = DateTime.Parse(this.dtpUpdateTimeEnd.Value.ToString("yyyy-MM-dd") + " 23:59:59"); se.inscrapflag = 0;// this.chkInScrapFlag.Checked ? 1 : 0;//是否清除报损待审产品 se.IsReworkFlag = 0;// this.chkIsReworkFlag.Checked ? 1 : 0;//是否清除返工产品 // 清除 int result = (int)DoAsync(() => { return PMModuleProxy.Service.SaveClearAllInproduction(se); }); if (result > Constant.INT_IS_ZERO) { MessageBox.Show(string.Format(Messages.MSG_CMN_I001, "在产产品", "批量清除数据"), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); // 刷新窗口数据 this.DialogResult = DialogResult.OK; } else { MessageBox.Show(string.Format(Messages.MSG_CMN_W001, "在产产品", "批量清除数据"), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } } catch (Exception ex) { // 对异常进行共通处理 ExceptionManager.HandleEventException(this.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); } } #endregion } }