diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_RestrictionController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_RestrictionController.cs index 2abbb9ee5..f106d5583 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_RestrictionController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_RestrictionController.cs @@ -1,8 +1,10 @@ -using Learun.Util; +using System; +using Learun.Util; using System.Data; using Learun.Application.TwoDevelopment.PersonnelManagement; using System.Web.Mvc; using System.Collections.Generic; +using System.Linq; namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers { @@ -89,10 +91,10 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [AjaxOnly] public ActionResult GetFormDayData(string keyValue) { - var ADR_RestrictionData = aDR_RestrictionIBLL.GetADR_RestrictionDay(keyValue); + var ADR_RestrictionData = aDR_RestrictionIBLL.GetADR_RestrictionDay(keyValue).Select(m=>m.WorkDay.ToString("yyyy-MM-dd")); var jsonData = new { - ADR_RestrictionDay = ADR_RestrictionData, + ADR_RestrictionDay = string.Join(",",ADR_RestrictionData) }; return Success(jsonData); } @@ -148,8 +150,16 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [AjaxOnly] public ActionResult SaveFormDay(string keyValue, string strEntity) { - List entity = strEntity.ToObject>(); - aDR_RestrictionIBLL.SaveFormDay(keyValue, entity); + List entity = strEntity.ToObject>(); + List listday=new List(); + foreach (var item in entity) + { + var ADR_RestrictionDayEntity = new ADR_RestrictionDayEntity(); + ADR_RestrictionDayEntity.RId = keyValue; + ADR_RestrictionDayEntity.WorkDay =Convert.ToDateTime(item); + listday.Add(ADR_RestrictionDayEntity); + } + aDR_RestrictionIBLL.SaveFormDay(keyValue, listday); if (string.IsNullOrEmpty(keyValue)) { } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/FormDay.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/FormDay.cshtml index 5450c6215..dcd9388d8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/FormDay.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/FormDay.cshtml @@ -16,16 +16,15 @@
上班日期*
- -
-
+ +
- +