日期:2014-05-17 浏览次数:20455 次
//前台通过ViewState保存数据在服务器上
public List<TeacherWorkingTime> AddTeacherWorkingTimeList
{
get
{
if (ViewState["AddTeacherWorkingTimeList"] == null)
{
ViewState["AddTeacherWorkingTimeList"] = new List<TeacherWorkingTime>();
}
return ViewState["AddTeacherWorkingTimeList"] as List<TeacherWorkingTime>;
}
set
{
ViewState["AddTeacherWorkingTimeList"] = value;
}
}
//新增临时数据,并且到list
protected void btn_AddItem_Click(object sender, EventArgs e)
{
int weekday = int.Parse(this.ddl_Weekday.SelectedValue);
string StartTime = this.ddl_StartTime.SelectedValue.Replace(":", "");
string EndTime = this.ddl_EndTime.SelectedValue.Replace(":", "");
int intStartTime = int.Parse(StartTime);
int intEndTime = int.Parse(EndTime);
TeacherWorkingTime model = new TeacherWorkingTime();