Commit 16993d3e authored by 黄奎's avatar 黄奎

页面修改

parent 3d2eee27
......@@ -540,30 +540,33 @@ namespace Edu.Module.Course
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Class_Plan_ViewModel.ClassRoomId),extModel.ClassRoomId }
{nameof(RB_Class_Plan_ViewModel.ClassRoomId),extModel.ClassRoomId },
{nameof(RB_Class_Plan_ViewModel.TeacherId),extModel.TeacherId },
{nameof(RB_Class_Plan_ViewModel.ClassDate),extModel.ClassDate },
};
flag = class_PlanRepository.Update(fileds, new WhereHelper(nameof(RB_Class_Plan_ViewModel.ClassPlanId), extModel.ClassPlanId));
if (extModel.PlanTimeList != null && extModel.PlanTimeList.Count > 0)
{
foreach (var item in extModel.PlanTimeList)
{
flag = class_TimeRepository.Update(item);
}
}
}
else
{
var newId = class_PlanRepository.Insert(extModel);
extModel.ClassPlanId = newId;
flag = newId > 0;
if (extModel.PlanTimeList != null && extModel.PlanTimeList.Count > 0)
}
class_TimeRepository.DeleteClassTimeByPlanIdRepository(extModel.ClassPlanId);
if (extModel.PlanTimeList != null && extModel.PlanTimeList.Count > 0)
{
foreach (var item in extModel.PlanTimeList)
{
foreach (var item in extModel.PlanTimeList)
item.ClassId = extModel.ClassId;
item.ClassPlanId = extModel.ClassPlanId;
item.Group_Id = extModel.Group_Id;
item.School_Id = extModel.School_Id;
if (item.ClassTimeId > 0)
{
flag = class_TimeRepository.Update(item);
}
else
{
item.ClassId = extModel.ClassId;
item.ClassPlanId = extModel.ClassPlanId;
item.Group_Id = extModel.Group_Id;
item.School_Id = extModel.School_Id;
flag = class_TimeRepository.Insert(item) > 0;
}
}
......
......@@ -57,6 +57,16 @@ WHERE 1=1
return base.DeleteOne(new VT.FW.DB.WhereHelper(nameof(RB_Class_Time_ViewModel.ClassId), ClassId));
}
/// <summary>
/// 根据计划删除班级上课时间
/// </summary>
/// <param name="ClassPlanId">班级编号</param>
/// <returns></returns>
public bool DeleteClassTimeByPlanIdRepository(int ClassPlanId)
{
return base.DeleteOne(new VT.FW.DB.WhereHelper(nameof(RB_Class_Time_ViewModel.ClassPlanId), ClassPlanId));
}
/// <summary>
/// 获取班级上课时间
/// </summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment