using Lskj.PubTaskPlan.Control;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
namespace Lskj.PubTaskPlan.Model
{
public class WeekControlModel
{
private WeekControl MianFormWeekControl;
public WeekControlModel(WeekControl weekControl, DataRow dataRow)
{
if (weekControl != null)
{
MianFormWeekControl = weekControl;
W_Week = dataRow != null && dataRow.Table.Columns.Contains("W_Week") ? Convert.ToInt32(dataRow["W_Week"] + "") : 1;
W_DayOfWeek = dataRow != null && dataRow.Table.Columns.Contains("W_DayOfWeek") ? dataRow["W_DayOfWeek"] + "" : "";
}
}
///
/// 按周,执行间隔
///
public int W_Week
{
get { return (int)MianFormWeekControl.spin_interval.Value; }
set { MianFormWeekControl.spin_interval.Value = value; }
}
///
/// 按周,星期几
///
public string W_DayOfWeek
{
get { return MianFormWeekControl.checkComBox_dayOfWeek.EditValue + ""; }
set { MianFormWeekControl.checkComBox_dayOfWeek.EditValue = value; }
}
}
}