| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- 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<PlnOrderDownLogEntity>(ultraGridDownlog.DisplayLayout.Bands[0]);
- BaseHelper.setOtherColumnReadOnly(ultraGridDownlog,new string[]{""});
- BaseHelper.InitCellPosition(ultraGridDownlog, new string[] { "PlnDivideId", "OrderSeq", "DeliveryNo" });
- InitDate();
- }
- /// <summary>
- /// 初始时间
- /// </summary>
- 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<PlnOrderDownLogEntity> listSource = EntityHelper.GetData<PlnOrderDownLogEntity>
- // ("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");
- }
- }
- }
|