| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- 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();
- }
- /// <summary>
- /// 按钮控件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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<OrderClause>("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;
- }
- }
- /// <summary>
- /// 刷新
- /// </summary>
- 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<DataTable>("com.hnshituo.pur.order.service.OrderClauseService", "find_Order", new object[] { POC, 0, 0 });
- GridHelper.CopyDataToDatatable(dt, dataTable1, true);
- }
- }
- }
|