You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
2.7 KiB
C#
55 lines
2.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Mesnac.Action.Base;
|
|
using Mesnac.Codd.Session;
|
|
using Mesnac.Basic;
|
|
using System.Data;
|
|
using Mesnac.Controls.Base;
|
|
using Mesnac.Controls.Default;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Mesnac.Action.Intake.Qingquan.Report
|
|
{
|
|
public class ReportPrinting : IntakeAction, IAction
|
|
{
|
|
public void Run(RuntimeParameter runtime)
|
|
{
|
|
base.RunIni(runtime);
|
|
|
|
List<DbMCControl> mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.Query);//获取所有待初始化控件
|
|
|
|
string materName = String.Empty;
|
|
string equipId = String.Empty;
|
|
string destBin = String.Empty;
|
|
IBaseControl lblmaterName = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "lblmatername").FirstOrDefault().BaseControl;
|
|
IBaseControl lblequipId = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "lblequipid").FirstOrDefault().BaseControl;
|
|
IBaseControl lbldestBin = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "lbldestbin").FirstOrDefault().BaseControl;
|
|
materName = lblmaterName.MCValue.ToString();
|
|
equipId = lblequipId.MCValue.ToString();
|
|
destBin = lbldestBin.MCValue.ToString();
|
|
if (string.IsNullOrEmpty(materName) || string.IsNullOrEmpty(equipId) || string.IsNullOrEmpty(destBin))
|
|
{
|
|
MessageBox.Show("请选择汇总!");
|
|
return;
|
|
}
|
|
|
|
IBaseControl startdate = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "startdate").FirstOrDefault().BaseControl;
|
|
IBaseControl starttime = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "starttime").FirstOrDefault().BaseControl;
|
|
IBaseControl enddate = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "enddate").FirstOrDefault().BaseControl;
|
|
IBaseControl endtime = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "endtime").FirstOrDefault().BaseControl;
|
|
|
|
DeliveryReportDetail drd = new DeliveryReportDetail();
|
|
drd.Startdate = startdate.MCValue.ToString();
|
|
drd.Starttime = starttime.MCValue.ToString();
|
|
drd.Enddate = enddate.MCValue.ToString();
|
|
drd.Endtime = endtime.MCValue.ToString();
|
|
drd.EquipId = equipId;
|
|
drd.MaterName = materName;
|
|
drd.DestBin = destBin;
|
|
drd.ReprotStart();
|
|
}
|
|
}
|
|
}
|