using com.hnshituo.core.webapp.vo;
using Common;
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace MeterModuleLibrary
{
///
/// 调整班次回调
///
/// 产品日期
/// 班次
/// 班组
public delegate void CallBack(DateTime productDate, string meterClass, string meterGroup);
public partial class frmHotDeliveryUpdateClass : Form
{
public event CallBack callBack;
private ComBaseInfoService comBaseInfoService = new ComBaseInfoService(); //基础数服务
public string productDateShow = "", meterClassShow = "", meterGroupShow = "";
public frmHotDeliveryUpdateClass()
{
InitializeComponent();
}
private void frmHotDeliveryUpdateClass_Load(object sender, EventArgs e)
{
tbProductDate.Text = productDateShow;
tbClass.Text = meterClassShow;
tbGroup.Text = meterGroupShow;
//热送磅班组信息载入cmbMeterGroupUp
RESTfulResult> rrComMeterGroop = comBaseInfoService.doQueryBaseList(new ComBaseInfo { validFlag = "1", pBaseCode = "001044" });
if (rrComMeterGroop.Succeed && rrComMeterGroop.Data != null && rrComMeterGroop.Data.Count > 0)
{
ClsControlPack.SetUltraComboDataSource(cmbMeterGroup, rrComMeterGroop.Data.ListToDataTable(), "baseCode", "baseName");
}
else
{
MessageBox.Show("热送磅班组信息载入失败!");
return;
}
//热送磅班次信息载入cmbMeterClassUp
RESTfulResult> rrComMeterClass = comBaseInfoService.doQueryBaseList(new ComBaseInfo { validFlag = "1", pBaseCode = "001043" });
if (rrComMeterClass.Succeed && rrComMeterClass.Data != null && rrComMeterClass.Data.Count > 0)
{
ClsControlPack.SetUltraComboDataSource(cmbMeterClass, rrComMeterClass.Data.ListToDataTable(), "baseCode", "baseName");
}
else
{
MessageBox.Show("热送磅班次信息载入失败!");
return;
}
}
///
/// 取消
///
///
///
private void Cancle_Click(object sender, EventArgs e)
{
Close();
}
///
/// 确认
///
///
///
private void btOK_Click(object sender, EventArgs e)
{
callBack(dtProductDate.Value, cmbMeterClass.Text, cmbMeterGroup.Text);
Close();
}
}
}