| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 |
- /*******************************************************************************
- * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
- * 类的信息:
- * 1.程序名称:F_PM_0101_1.cs
- * 2.功能描述:成型特殊记录
- * 编辑履历:
- * 作者 日期 版本 修改内容
- * 冯林勇 2023/06/14 1.00 新建
- *******************************************************************************/
- 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;
- using System;
- using System.Reflection;
- using System.Windows.Forms;
- namespace Dongke.IBOSS.PRD.Client.PMModule
- {
- /// <summary>
- /// 成型特殊记录
- /// </summary>
- public partial class F_PM_0101_1 : DKFormBase
- {
- #region 成员变量
- #endregion
- #region 构造函数
- /// <summary>
- /// 构造函数
- /// </summary>
- public F_PM_0101_1()
- {
- this.InitializeComponent();
- this.InitializeControls();
- }
- #endregion
- #region 属性
- #endregion
- #region 事件
- /// <summary>
- /// 窗体加载
- /// </summary>
- private void F_PM_0101_1_Load(object sender, EventArgs e)
- {
- try
- {
- }
- 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 tsbtnClose_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- /// <summary>
- /// 关闭窗体
- /// </summary>
- private void btnCancel_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- /// <summary>
- /// 查询
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnSearch_Click(object sender, EventArgs e)
- {
- try
- {
- this.QueryDataFromOther();
- this.dgvDetail.IsSetInputColumnsColor = true;
- }
- 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 toolStripButton2_Click(object sender, EventArgs e)
- {
- try
- {
- if (this.dgvDetail.SelectedRows.Count != 0)
- { string groutinglineId= this.dgvDetail.SelectedRows[0].Cells["成型线ID"].Value.ToString();
- string GROUTINGLINECODE = this.dgvDetail.SelectedRows[0].Cells["成型线编码"].Value.ToString();
- string NEWMOLDFLAG = this.dgvDetail.SelectedRows[0].Cells["新模"].Value.ToString();
- string CONVERTPRODUCEFLAG = this.dgvDetail.SelectedRows[0].Cells["转产"].Value.ToString();
- string CONVERTLINEGLAG = this.dgvDetail.SelectedRows[0].Cells["转线"].Value.ToString();
- F_PM_0101_2 fpm01012 = new F_PM_0101_2(groutinglineId,GROUTINGLINECODE, NEWMOLDFLAG, CONVERTPRODUCEFLAG, CONVERTLINEGLAG);
- DialogResult dialogresult = fpm01012.ShowDialog();
- btnSearch_Click(sender, null);
- }
- }
- 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 btnClearCondition_Click(object sender, EventArgs e)
- {
- try
- {
- //新模标识
- this.NEWMOLDFLAG.Checked = false;
- //转产标识
- this.CONVERTPRODUCEFLAG.Checked = false;
- //转线标识
- this.CONVERTLINEGLAG.Checked = false;
- //成型线编码
- this.scbGroutingLine.ClearValue();
- }
- 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 toolStripButton1_Click(object sender, EventArgs e)
- {
- try
- {
- this.dgvDetail.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
- }
- catch (Exception ex)
- {
- // 对异常进行共通处理
- ExceptionManager.HandleEventException(this.ToString(),
- MethodBase.GetCurrentMethod().Name, this.Text, ex);
- }
- }
- #endregion
- #region 私有方法
- /// <summary>
- /// 初始化控件
- /// </summary>
- private void InitializeControls()
- {
- }
- private void QueryDataFromOther()
- {
- try
- {
- string NEWMOLDFLAGS = "0";
- string CONVERTPRODUCEFLAGS = "0";
- string CONVERTLINEGLAGS = "0";
- ClientRequestEntity cre = new ClientRequestEntity();
- cre.NameSpace = "F_PM_0101_1";
- cre.Name = "GROUTINGSPECIAL";
- cre.Properties["GroutingLineCode"] = this.scbGroutingLine.Text.Trim();
- if (CONVERTLINEGLAG.Checked == true) {
- CONVERTLINEGLAGS="1";
- }
- if (CONVERTPRODUCEFLAG.Checked == true)
- {
- CONVERTPRODUCEFLAGS = "1";
- }
- if (NEWMOLDFLAG.Checked == true)
- {
- NEWMOLDFLAGS = "1";
- }
- cre.Properties["NEWMOLDFLAG"] = NEWMOLDFLAGS;
- cre.Properties["CONVERTPRODUCEFLAG"] = CONVERTPRODUCEFLAGS;
- cre.Properties["CONVERTLINEGLAG"] = CONVERTLINEGLAGS;
- ServiceResultEntity sre = DoAsync<ServiceResultEntity>(() =>
- {
- return PCModuleProxyNew.Service.HandleRequest(cre);
- }
- );
- if (sre.Status == Constant.ServiceResultStatus.Success)
- {
- // 查询成功
- this.dgvDetail.DataSource = sre.Data.Tables[0];
- }
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- #endregion
- }
- }
|