using Core.Mes.Client.Comm.Control; using Core.Mes.Client.Comm.Tool; using Core.StlMes.Client.PlnSaleOrd.BaseMethod; using Core.StlMes.Client.PlnSaleOrd.Entity; using CoreFS.CA06; 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 Core.Mes.Client.Comm.Server; namespace Core.StlMes.Client.PlnSaleOrd { public partial class FrmPlnOrderDownLog : FrmBase { public FrmPlnOrderDownLog() { InitializeComponent(); this.IsLoadUserView = true; } private void chc_CheckedChanged(object sender, EventArgs e) { if (chcTime.Checked) { timeBegin.ReadOnly = false; timeEnd.ReadOnly = false; } else { timeBegin.ReadOnly = true; timeEnd.ReadOnly = true; } if (chcVrsionNo.Checked) { txtVrsionNo.ReadOnly = false; } else { txtVrsionNo.ReadOnly = true; } if (chcOrderNo.Checked) { txtOrderNo.ReadOnly = false; } else { txtOrderNo.ReadOnly = true; } if (chcType.Checked) { txtType.ReadOnly = false; } else { txtType.ReadOnly = true; } if (chcOrdersource.Checked) { txtSource.ReadOnly = false; } else { txtSource.ReadOnly = true; } } private void FrmPlnOrderDownLog_Load(object sender, EventArgs e) { EntityHelper.ShowGridCaption(ultraGridDownlog.DisplayLayout.Bands[0]); BaseHelper.setOtherColumnReadOnly(ultraGridDownlog,new string[]{""}); BaseHelper.InitCellPosition(ultraGridDownlog, new string[] { "PlnDivideId", "OrderSeq", "DeliveryNo" }); InitDate(); } /// /// 初始时间 /// private void InitDate() { timeBegin.Value = DateTime.Now.AddDays(-30); timeEnd.Value = DateTime.Now.AddDays(1).AddSeconds(-1); txtVrsionNo.Text = DateTime.Today.ToString("yyyyMMdd"); } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": Query(); break; case "Export": GridHelper.ulGridToExcel(ultraGridExport, "合同下发及回退日志"); break; case "Close": this.Close(); break; default: break; } } void Query() { string beginTime = "";//开始时间 string endTime = "";//结束时间 if (chcTime.Checked && timeBegin.Value != null && timeEnd.Value != null) { beginTime = timeBegin.DateTime.ToString("yyyy-MM-dd") + " 0:0:0"; endTime = timeEnd.DateTime.ToString("yyyy-MM-dd") + " 23:59:59"; } string vrsionNo = "";//版次号 if (chcVrsionNo.Checked) { vrsionNo = txtVrsionNo.Text.Trim(); } string orderno = "";//合同号 if (chcOrderNo.Checked) { orderno = txtOrderNo.Text.Trim(); } string type = "";//类型 if (chcType.Checked && txtType.Value != null) { type = txtType.Value.ToString(); } string ordersource = "";//合同来源 if (chcOrdersource.Checked && txtSource.Value != null) { ordersource = txtSource.Value.ToString(); } //List listSource = EntityHelper.GetData // ("com.steering.pss.plnsaleord.FrmPlnOrderDownLog.queryOrderDownLog", new object[] { beginTime, endTime, vrsionNo, orderno, type, ordersource }, this.ob); //plnOrderDownLogEntityBindingSource.DataSource = listSource; DataTable dt = ServerHelper.GetData("com.steering.pss.plnsaleord.FrmPlnOrderDownLog.queryOrderDownLog", new object[] { beginTime, endTime, vrsionNo, orderno, type, ordersource }, this.ob); GridHelper.CopyDataToDatatable(dt, dataTable1, true); ///设置grid不可编辑 PlanComm.setGridActivation(ultraGridExport.DisplayLayout.Bands[0]); PlanComm.setGridDigitalCol(ultraGridExport.DisplayLayout.Bands[0], 6, 3, "ORDER_QTY", "ORDERWEIGHT", "CONFIRM_WT_SUM", "Z_ORDERWEIGHT", "ZG_WT_MIN"); PlanComm.setGridDigitalCol(ultraGridExport.DisplayLayout.Bands[0], 5, 2, "TOTLENGTH", "HEIGHT_YLG", "DIMATER_YLG", "AIMWALLTHICK_ZG"); PlanComm.setGridDigitalCol(ultraGridExport.DisplayLayout.Bands[0], 5, 0, "Z_ORDERNUM"); } } }