| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- using Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.Judge.Commons;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinGrid;
- 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 Core.StlMes.Client.Judge.Forms
- {
- public partial class CraftSelect : FrmBase
- {
- private Dal _d;
- public CraftSelect(OpeBase ob)
- {
- if (!"admin".Equals(UserInfo.GetUserName()) && !"屈松山".Equals(UserInfo.GetUserName()) && !"宋丹".Equals(UserInfo.GetUserName()))
- {
- throw new Exception("您没有该权限!");
- }
- InitializeComponent();
- _d = new Dal(ob);
- }
- public UltraGridRow row {
- get { return ultraGrid1.ActiveRow; }
- }
- public void Query(string ordLnPk)
- {
- DataTable dt = _d.GetTableByXmlId("JdgCraftOrdDesign.getCraftInfo", ordLnPk);
- GridHelper.CopyDataToDatatable(dt, dataTable1, true);
- GridHelper.RefreshAndAutoSize(ultraGrid1);
- ultraGrid1.EndUpdate();
- }
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key)
- {
- case "Save":
- UltraGridRow urg = ultraGrid1.ActiveRow;
- if (urg == null)
- {
- MessageUtil.ShowTips("请选择数据!");
- return;
- }
- this.DialogResult = DialogResult.OK;
- break;
- case "Close":
- this.DialogResult = DialogResult.Cancel;
- break;
- }
- }
- }
- }
|