Commit ac578bf7 authored by 黄奎's avatar 黄奎

页面修改

parent 6bc6f98c
......@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Edu.Common
......@@ -187,5 +188,16 @@ namespace Edu.Common
}
return weekDay;
}
/// <summary>
/// 是否为时间型字符串
/// </summary>
/// <param name="source">时间字符串(15:00:00)</param>
/// <returns></returns>
public static bool IsTime(string StrSource)
{
return Regex.IsMatch(StrSource, @"^((20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d)$");
}
}
}
\ No newline at end of file
......@@ -64,6 +64,15 @@ namespace Edu.Module.Course
public List<RB_Class_ViewModel> GetClassPageListModule(int pageIndex, int pageSize, out long rowsCount, RB_Class_ViewModel query)
{
var list = classRepository.GetClassPageListRepository(pageIndex, pageSize, out rowsCount, query);
if (list != null && list.Count > 0)
{
string ids = string.Join(",", list.Select(qitem => qitem.CouseId));
foreach (var item in list)
{
}
}
return list;
}
......@@ -553,6 +562,7 @@ namespace Edu.Module.Course
{
list.Add(new
{
UserIcon="",
item.Id,
SexStr = item.Sex == 1 ? "男" : "女",
item.GuestName,
......
......@@ -161,6 +161,25 @@ namespace Edu.WebApi.Controllers.Course
{
Common.Plugin.LogHelper.Write(ex, "SetClass_DefaultPlanTimeList");
}
if (extModel.DefaultPlanTimeList != null && extModel.DefaultPlanTimeList.Count > 0)
{
foreach (var item in extModel.DefaultPlanTimeList)
{
string message = "";
if (!Common.ConvertHelper.IsTime(item.StartTime + ":00"))
{
message = "【" + item.StartTime + "】格式不正确!(格式参考 11:30)";
}
if (!Common.ConvertHelper.IsTime(item.EndTime + ":00"))
{
message += ",【" + item.EndTime + "】格式不正确!(格式参考 08:10)";
}
if (!string.IsNullOrEmpty(message))
{
return ApiResult.ParamIsNull(message: message);
}
}
}
bool flag = classModule.SetClassModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
......
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