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; using CoreFS.CA06;using Pur.Entity;using Pur.Entity; using Pur.Entity.pur_orderEntiy; using Core.Mes.Client.Comm.Control; using Infragistics.Win.UltraWinGrid; using Core.Mes.Client.Comm; using Core.Mes.Client.Comm.Tool; using Core.Mes.Client.Comm.Server; namespace Pur.order { public partial class FrmClauseInMode : FrmPmsBase { private String orderType_tips=""; private String clauseId; private String clauseName; private String clauseDesc; private int clauseOrderBy; private String clauseType; private String clauseDefault; public String getClauseType() { return this.clauseType; } public String getClauseDefault() { return this.clauseDefault; } public String getClauseId() { return this.clauseId; } public String getClauseName() { return this.clauseName; } public String getClauseDesc() { return this.clauseDesc; } public int getClauseOrderBy() { return this.clauseOrderBy; } public FrmClauseInMode() { InitializeComponent(); } public FrmClauseInMode(OpeBase ob) { this.ob = ob; InitializeComponent(); } public FrmClauseInMode(OpeBase ob,String type) { this.orderType_tips = type; this.ob = ob; InitializeComponent(); } private void FrmClauseInMode_Load(object sender, EventArgs e) { //加载条款类型下拉框 DataTable dt1 = ServerHelper.GetData("com.hnshituo.pur.configure.service.impl.CoreBaseInfoNew.doQuery", new Object[] { "1218" }, this.ob); foreach (DataRow row in dt1.Rows) { row["baseName"] = "[" + row["memo"] + "]" + row["baseName"]; } comm.FilComboboxAdd(cop_clauseType, dt1, "baseCode", "baseName", "validflag NOT in ('0')", true, "全部", ""); cop_clauseType.SelectedIndex = 0; DataTable dt2 = ServerHelper.GetData("com.hnshituo.pur.configure.service.impl.CoreBaseInfoNew.doQuery", new Object[] { "1200" }, this.ob); comm.FilComboboxAdd(cop_orderType, dt2, "baseCode", "baseName", "validflag NOT in ('0')", true, "全部", ""); if (String.IsNullOrEmpty(orderType_tips)) { cop_orderType.SelectedIndex = 0; } else { cop_orderType.Value =orderType_tips; } GridHelper.SetExcludeColumnsActive(ultraGrid1.DisplayLayout.Bands[0], new string[] { }); doQuery(); } /// /// 按钮控件 /// /// /// private void barsManagerButon_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e) { switch (e.Tool.Key.ToString()) { case "Query": { doQuery(); } break; case "conFirmation": { UltraGridRow uge = ultraGrid1.ActiveRow; this.clauseDesc = uge.Cells["clauseDesc"].Value.ToString(); this.clauseId = uge.Cells["clauseId"].Value.ToString(); OrderClause tempPOC = this.execute("com.hnshituo.pur.order.service.OrderClauseService", "findById", new object[] { this.clauseId}); this.clauseName = uge.Cells["clauseName"].Value.ToString(); this.clauseOrderBy = Convert.ToInt32(uge.Cells["clauseOrderBy"].Value); this.clauseType = tempPOC.ClauseType; this.clauseDefault = tempPOC.ClauseDefault; this.Close(); return; } break; case "ESC": { this.Close(); } break; case "doClear": // ButtonTool this.clauseDesc = ""; this.clauseId = ""; this.clauseName = ""; this.clauseOrderBy = 1; this.clauseType = ""; this.clauseDefault = ""; this.Close(); return; break; } } /// /// 刷新 /// private void doQuery() { OrderClause POC = new OrderClause(); POC.ClauseId = txt_ClauseId.Text; POC.ClauseName = txt_ClauseName.Text; POC.ClauseType = cop_clauseType.Value.ToString().Trim(); POC.OrderType = cop_orderType.Value.ToString().Trim(); POC.Validflag = "1"; DataTable dt = this.execute("com.hnshituo.pur.order.service.OrderClauseService", "find_Order", new object[] { POC, 0, 0 }); GridHelper.CopyDataToDatatable(dt, dataTable1, true); } } }