using Core.Mes.Client.Comm.Control;
using Core.Mes.Client.Comm.Server;
using Core.StlMes.Client.PlnSaleOrd.报表.entity;
using Core.StlMes.Client.PlnSaleOrd.工序排产;
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;
namespace Core.StlMes.Client.PlnSaleOrd.报表
{
public partial class FrmProductionSchedulingAndCoupling : FrmBase
{
private string departm = "";
private string[] plineCode = null;
public FrmProductionSchedulingAndCoupling()
{
InitializeComponent();
}
private void FrmProductionSchedulingAndCoupling_Load(object sender, EventArgs e)
{
//NativeMethodNew na = new NativeMethodNew(this.ob);
//departm = UserInfo.GetDepartment();
//plineCode = na.GetPCode(departm);//获取 用户 对应的产线
plineCode = PlanHelper.InitDropPlinePower("G", ucePlineCode, this.ValidDataPurviewIds, this.ob);
////绑定产线
//ucePlineCode.DataSource = ServerHelper.GetData("com.steering.mes.zgmil.report.FrmMilDateStatistics.getPlineName", new Object[] { }, this.ob);
//ucePlineCode.ValueMember = "PLINE_CODE";
//ucePlineCode.DisplayMember = "PLINE_NAME";
}
///
/// 重写基类方法
///
///
///
public override void ToolBar_Click(object sender, string ToolbarKey)
{
switch (ToolbarKey)
{
case "Query":
doQuery();
break;
case "Export":
ExportData();
break;
case "Close":
this.Close();
break;
}
}
///
/// 导出
///
private void ExportData()
{
GridHelper.ulGridToExcel(ultraGrid1, "加工排产一级与接箍订单");
}
///
/// 查询
///
private void doQuery()
{
string plineCode = "";
if (ultraPlineCode.Checked)
{
if (ucePlineCode.Text.Trim() == "")
{
plineCode = "";
}
else
{
plineCode = ucePlineCode.Value.ToString();
}
}
WaitingForm2 wf = new WaitingForm2("正在加载,请稍候....");
DataTable dt = ServerHelper.GetData("com.steering.pss.plnsaleord.report.FrmProductionSchedulingAndCoupling.getQrue", new Object[] { plineCode }, this.ob);
GridHelper.CopyDataToDatatable(dt, this.dataTable1, true);
//GridHelper.RefreshAndAutoSize(this.ultraGrid1);
wf.Close();
}
///
/// 查询条件
///
///
///
private void chkDate_CheckedChanged(object sender, EventArgs e)
{
if (ultraPlineCode.Checked) { ucePlineCode.Enabled = true; } else { ucePlineCode.Enabled = false; }
}
}
}