| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- using Dongke.IBOSS.PRD.Basics.BaseControls;
- using Dongke.IBOSS.PRD.Basics.BaseResources;
- using Dongke.IBOSS.PRD.Client.CommonModule;
- using Dongke.IBOSS.PRD.Client.Controls.SearchBox;
- using Dongke.IBOSS.PRD.WCF.DataModels;
- using Dongke.IBOSS.PRD.WCF.Proxys;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace Dongke.IBOSS.PRD.Client.Controls.SelectForm
- {
- public partial class F_SAPIdnrk : DKDockPanelBase
- {
- #region 构造函数
- public F_SAPIdnrk()
- {
- InitializeComponent();
- }
- #endregion
- #region 属性
- public string _IDNRK;
- public string _MEINS;
- public string _IDNRKNAME;
- #endregion
- #region 事件
- /// <summary>
- /// 查询
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void tsbtnSearch_Click(object sender, EventArgs e)
- {
- try
- {
- string IDNRK = this.txtIdnrk.Text.Trim();
- // 调用服务器端获取数据集
- ClientRequestEntity cre = new ClientRequestEntity();
- cre.NameSpace = "Hegii";
- cre.Name = "GetIdnrkCode";
- cre.Properties["IDNRK"] = this.txtIdnrk.Text.Trim();
- cre.Properties["IDNRKNAME"] = this.txtIdnrkName.Text.Trim();
- ServiceResultEntity sre = DoAsync<ServiceResultEntity>(() =>
- {
- return SAPDataModuleProxy.Service.DoRequest(cre);
- });
- if (sre.Status == Constant.ServiceResultStatus.Success)
- {
- // 查询成功
- this.dgvIdnrk.DataSource = sre.Data.Tables[0];
- this.tsbtnAdaptive_Click(null, null);
- if (this.dgvIdnrk.RowCount == 0)
- {
- DKMessageBox.ShowDialog(this, DKMessageCode.I_CMN_S_001);
- }
- }
- }
- catch (Exception ex)
- {
- // 对异常进行共通处理
- ExceptionManager.HandleEventException(this.ToString(),
- System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
- }
- }
- /// <summary>
- /// 自适应列宽
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void tsbtnAdaptive_Click(object sender, EventArgs e)
- {
- this.dgvIdnrk.AutoResizeColumns();
- }
- /// <summary>
- /// 清空条件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void tsbtnClear_Click(object sender, EventArgs e)
- {
- this.txtIdnrk.Text = null;
- }
- /// <summary>
- /// 取消
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnCancel_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- /// <summary>
- /// 确认
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btncheck_Click(object sender, EventArgs e)
- {
- DataGridViewRow currentRow = this.dgvIdnrk.CurrentRow;
- if (currentRow != null)
- {
- //this._invoiceLayoutID = Convert.ToInt32(currentRow.Cells["InvoiceLayoutID"].Value);
- _IDNRK = currentRow.Cells["IDNRK"].Value.ToString();
- _IDNRKNAME = currentRow.Cells["IDNRKNAME"].Value.ToString();
- _MEINS = currentRow.Cells["MEINS"].Value.ToString();
- this.DialogResult = DialogResult.OK;
- }
-
- }
- #endregion
- }
- }
|