/// <summary> /// 根据区域ID删除区域限制进入、禁止进入人员信息 /// </summary> /// <param name="arearestrictedpersonRequest"></param> /// <returns></returns> public BasicResponse DeleteArearestrictedpersonByAreaId(R_ArearestrictedpersonDeleteByAreaIdRequest arearestrictedpersonRequest) { var result = new BasicResponse(); _Repository.Delete(a => a.AreaId == arearestrictedpersonRequest.AreaId); return(result); }
/// <summary> /// 保存区域限制进入、禁止进入人员信息 /// </summary> /// <param name="AreaId"></param> /// <param name="restrictedpersonInfoList"></param> private void SaveRestrictedperson(string AreaId, List <R_ArearestrictedpersonInfo> restrictedpersonInfoList) { if (restrictedpersonInfoList == null) { return; } //先删除原来的限制进入、禁止进入信息 R_ArearestrictedpersonDeleteByAreaIdRequest restrictedpersonRequest = new R_ArearestrictedpersonDeleteByAreaIdRequest(); restrictedpersonRequest.AreaId = AreaId; _R_ArearestrictedpersonService.DeleteArearestrictedpersonByAreaId(restrictedpersonRequest); //再进行添加操作 foreach (R_ArearestrictedpersonInfo addRestrictedpersonInfo in restrictedpersonInfoList) { R_ArearestrictedpersonAddRequest add_restrictedpersonRequest = new R_ArearestrictedpersonAddRequest(); add_restrictedpersonRequest.ArearestrictedpersonInfo = addRestrictedpersonInfo; _R_ArearestrictedpersonService.AddArearestrictedperson(add_restrictedpersonRequest); } }