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 Core.Mes.Client.Comm.Control; using Core.Mes.Client.Comm; using Pur.Entity.configureEntity; using Infragistics.Win.UltraWinGrid; using System.Collections; using Pur.Entity.pur_orderEntiy; using Pur.configure; using Pur.Pop_upWindow; using Pur.require_plan; using Core.Mes.Client.Comm.Tool; using com.hnshituo.pur.vo; using Infragistics.Win; namespace Pur.ck { public partial class FrmCkRecBill : FrmPmsBase { public FrmCkRecBill() { InitializeComponent(); COPStatus.SelectedIndex = 3;//默认为审批 ultraGrid1.DisplayLayout.Bands[0].Override.AllowUpdate = DefaultableBoolean.False; ultraGrid1.DisplayLayout.Bands[0].Override.AllowUpdate = DefaultableBoolean.False; } //菜单按钮事件 public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": GetPUR_ORDER_M(); break; case "takeDelivery":// 收货 takeDelivery(); break; } } /// /// 查询 /// private void GetPUR_ORDER_M() { dataTable2.Clear(); dataTable3.Clear(); OrderM Odm = new OrderM(); Odm.OrderId = COP_OrderId.Text; Odm.SuppName = txt_SuppName.Text; if (COPStatus.Value != null && COPStatus.Value.ToString() != "") { Odm.Status = COPStatus.Value.ToString(); } Odm.Validflag = "1"; DataTable dt = this.execute("com.hnshituo.pur.order.service.OrderMService", "find_OrderM", new object[] { Odm, 0, 0 }); //按创建时间降序 if (dt.Rows.Count > 0) { dt.DefaultView.Sort = "CREATETIME DESC"; dt = dt.DefaultView.ToTable(); } GridHelper.CopyDataToDatatable(dt, dataTable1, true); } /// /// 收货 /// public void takeDelivery() { if (ultraGrid1.ActiveRow != null) { //FrmPopConfirmGoods frm = new FrmPopConfirmGoods(this.ob, ultraGrid1.ActiveRow.Cells["OrderId"].Value.ToString(), ultraGrid1.ActiveRow.Cells["SUPPCODE"].Value.ToString(), ultraGrid1.ActiveRow.Cells["SUPPNAME"].Value.ToString()); //frm.ShowDialog(); } } /// ///从表 查询 /// private void getOrderC(string ab) { dataTable2.Clear(); dataTable3.Clear(); OrderC odC = new OrderC(); odC.OrderId = ab; odC.Validflag = "1"; DataTable dt = this.execute("com.hnshituo.pur.order.service.OrderCService", "findOC", new object[] { odC, 0, 0 }); //按创建时间降序 dt.DefaultView.Sort = "CREATETIME DESC"; dt = dt.DefaultView.ToTable(); GridHelper.CopyDataToDatatable(dt, dataTable2, true); } /// /// 更新合同行 /// /// /// private void ultraGrid1_AfterRowActivate(object sender, EventArgs e) { UltraGridRow uge = ultraGrid1.ActiveRow; OrderC odC = new OrderC(); odC.OrderId = uge.Cells["OrderId"].Value.ToString(); odC.Validflag = "1"; DataTable dt = this.execute("com.hnshituo.pur.order.service.OrderCService", "findOC", new object[] { odC, 0, 0 }); GridHelper.CopyDataToDatatable(dt, dataTable2, true); } //选择供应商 private void txt_SuppName_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e) { frmSuppSel frm = new frmSuppSel(this.ob); frm.ShowDialog(); txt_SuppName.Text = frm.strSUPP_NAME; } } }