| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- /*******************************************************************************
- * 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 事件
- /// <summary>
- /// 关闭按钮事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void tsbtnClose_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void F_PM_2102_Load(object sender, EventArgs e)
- {
- this.dtpUpdateTimeStart.Value = DateTime.Now.Date;
- this.dtpUpdateTimeEnd.Value = DateTime.Now.Date;
- }
- /// <summary>
- /// 保存按钮事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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
- }
- }
|