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.
|
|
|
|
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 Mesnac.Action.Base;
|
|
|
|
|
|
|
|
|
|
namespace Mesnac.Action.Feeding.Qingquan.ProducingPlan
|
|
|
|
|
{
|
|
|
|
|
public partial class FrmShiftClass : Form
|
|
|
|
|
{
|
|
|
|
|
public FrmShiftClass()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 属性定义
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 当前选择的班组
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int ShiftClass
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (this.cmbShiftClass.SelectedValue == null)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
int result = 0;
|
|
|
|
|
int.TryParse(this.cmbShiftClass.SelectedValue.ToString(), out result);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 初始化数据
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 初始化数据
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void InitData()
|
|
|
|
|
{
|
|
|
|
|
DataTable shiftClassTable = PlanCommon.GetShiftClassData(Basic.DataSourceFactory.MCDbType.Local);
|
|
|
|
|
this.cmbShiftClass.DisplayMember = "ClassName";
|
|
|
|
|
this.cmbShiftClass.ValueMember = "ObjID";
|
|
|
|
|
this.cmbShiftClass.DataSource = shiftClassTable;
|
|
|
|
|
|
|
|
|
|
//默认选中工厂日历中的班组
|
|
|
|
|
DataRow row = PlanCommon.GetServerShiftTimeRow();
|
|
|
|
|
if (row != null)
|
|
|
|
|
{
|
|
|
|
|
int shift_class = Mesnac.Basic.DataProcessor.RowValue(row, "Shift_class", 0);
|
|
|
|
|
if (shift_class > 0)
|
|
|
|
|
{
|
|
|
|
|
this.cmbShiftClass.SelectedValue = shift_class;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 初始化界面文本
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 初始化界面文本
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void InitUI()
|
|
|
|
|
{
|
|
|
|
|
this.Text = LanguageService.Instance.Read(160);
|
|
|
|
|
this.label1.Text = LanguageService.Instance.Read(160);
|
|
|
|
|
this.btnOK.Text = LanguageService.Instance.Read(18);
|
|
|
|
|
this.btnCancel.Text = LanguageService.Instance.Read(19);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
private void FrmShiftClass_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.InitUI();
|
|
|
|
|
this.InitData();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnOK_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|