| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- /*******************************************************************************
- * Copyright(c) 2016 DongkeSoft All rights reserved. / Confidential
- * 类的信息:
- * 1.程序名称:F_SAP_HEGII_011301.cs
- * 2.功能描述:手动同步
- * 编辑履历:
- * 作者 日期 版本 修改内容
- * 陈晓野 2018/11/16 1.00 新建
- *******************************************************************************/
- using System;
- using System.Reflection;
- using System.Windows.Forms;
- using Dongke.IBOSS.PRD.Basics.BaseControls;
- using Dongke.IBOSS.PRD.Client.CommonModule;
- using Dongke.IBOSS.PRD.WCF.DataModels;
- using Dongke.IBOSS.PRD.WCF.Proxys;
- namespace Dongke.IBOSS.PRD.Client.SAPDataModule
- {
- public partial class F_SAP_HEGII_011301 : FormBase
- {
- public F_SAP_HEGII_011301()
- {
- InitializeComponent();
- this.dtpSyncDate.Value = DateTime.Now.Date;
- }
- /// <summary>
- /// 同步
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnSave_Click(object sender, EventArgs e)
- {
- try
- {
- string syncDate = this.dtpSyncDate.Value.ToString("yyyy-MM-dd");
- DialogResult dr = MessageBox.Show("是否同步【" + syncDate + "】的数据。",
- this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
- if (dr != DialogResult.Yes)
- {
- return;
- }
- ClientRequestEntity cre = new ClientRequestEntity();
- cre.NameSpace = "Hegii";
- cre.Name = "SyncKunChuanData";
- cre.Properties["SyncDate"] = syncDate;
- ServiceResultEntity sre = (ServiceResultEntity)DoAsync(() =>
- {
- return SAPDataModuleProxy.Service.DoRequest(cre);
- });
- if (sre.OtherStatus > 0)
- {
- DKMessageBox.ShowDialog(this, DKMessageCode.I_CMN_S_002);
- this.DialogResult = DialogResult.OK;
- Close();
- }
- else
- {
- DKMessageBox.ShowDialog(this, DKMessageCode.W_CMN_S_004, sre.Message);
- }
- }
- catch (Exception ex)
- {
- // 对异常进行共通处理
- ExceptionManager.HandleEventException(this.ToString(),
- MethodBase.GetCurrentMethod().Name, this.Text, ex);
- }
- }
- /// <summary>
- /// 取消
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnCancel_Click(object sender, EventArgs e)
- {
- this.DialogResult = DialogResult.Cancel;
- this.Close();
- }
- }
- }
|