| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- using Core.Mes.Client.Comm.Format;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.YdmPipeManage.Entity;
- using Core.StlMes.Client.YdmPipeManage.Tool;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinGrid;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace Core.StlMes.Client.YdmPipeManage
- {
- public partial class FrmBaseCarryOver : FrmBase
- {
- public FrmBaseCarryOver()
- {
- InitializeComponent();
- }
- private void FrmBaseCarryOver_Load(object sender, EventArgs e)
- {
- EntityHelper.ShowGridCaption<ComBaseInfoEntity>(this.ultraGrid1.DisplayLayout.Bands[0]);
- }
- /// <summary>
- /// 重写基类方法
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="ToolbarKey"></param>
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- doQuery();
- break;
- case "UpdateCarryOver":
- updateCarryOver();
- break;
- case "Close":
- this.Close();
- break;
- }
- }
- /// <summary>
- /// 查询
- /// </summary>
- private void doQuery()
- {
- string[] arr = BaseMethod.InitPermissions(this.ValidDataPurviewIds, ob);
- List<ComBaseInfoEntity> listSource = EntityHelper.GetData<ComBaseInfoEntity>(
- "com.steering.pss.ydm.pipemanage.FrmBaseCarryOver.doQuery", new object[] { arr,this.CustomInfo }, this.ob);
- ComBaseInfoEntitybindingSource.DataSource = listSource;
- }
- /// <summary>
- /// 修改结转标识
- /// </summary>
- private void updateCarryOver()
- {
- this.ultraGrid1.UpdateData();
- UltraGridRow uRow = this.ultraGrid1.ActiveRow;
- if (uRow == null)
- {
- MessageUtil.ShowTips("请选择需要修改的信息!");
- return;
- }
- ComBaseInfoEntity comBaseInfoTity = (ComBaseInfoEntity)uRow.ListObject;
- string comBaseEntity = JSONFormat.Format(comBaseInfoTity);
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.pss.ydm.pipemanage.FrmBaseCarryOver";
- ccp.MethodName = "updateCarryOver";
- ccp.ServerParams = new object[] { comBaseEntity };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("修改成功!"))
- {
- doQuery();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- }
- }
|