Пример #1
0
        public BasicResponse <JC_AlarmNotificationPersonnelConfigInfo> UpdateJC_AlarmNotificationPersonnelConfig(AlarmNotificationPersonnelConfigUpdateRequest jC_Alarmnotificationpersonnelconfigrequest)
        {
            var _jC_Alarmnotificationpersonnelconfig = ObjectConverter.Copy <JC_AlarmNotificationPersonnelConfigInfo, JC_AlarmnotificationpersonnelconfigModel>(jC_Alarmnotificationpersonnelconfigrequest.JC_AlarmNotificationPersonnelConfigInfo);

            var _jC_AlarmNotificationPersonnel = ObjectConverter.CopyList <JC_AlarmNotificationPersonnelInfo, JC_AlarmNotificationPersonnelModel>
                                                     (jC_Alarmnotificationpersonnelconfigrequest.JC_AlarmNotificationPersonnelInfoList);

            TransactionsManager.BeginTransaction(() =>
            {
                _Repository.UpdateJC_AlarmNotificationPersonnelConfig(_jC_Alarmnotificationpersonnelconfig);

                _AlarmNotificationPersonnelRepository.DeleteJC_AlarmNotificationPersonnelByAlarmConfigId(_jC_Alarmnotificationpersonnelconfig.Id);

                _AlarmNotificationPersonnelRepository.AddJC_AlarmNotificationPersonnelList(_jC_AlarmNotificationPersonnel.ToList());
            });

            if (Basic.Framework.Data.PlatRuntime.Items.ContainsKey(DataContract.UserRoleAuthorize.KeyConst.AlarmNotificationChangedKey))
            {
                Basic.Framework.Data.PlatRuntime.Items[DataContract.UserRoleAuthorize.KeyConst.AlarmNotificationChangedKey] = DateTime.Now;
            }
            else
            {
                Basic.Framework.Data.PlatRuntime.Items.Add(DataContract.UserRoleAuthorize.KeyConst.AlarmNotificationChangedKey, DateTime.Now);
            }

            var jC_Alarmnotificationpersonnelconfigresponse = new BasicResponse <JC_AlarmNotificationPersonnelConfigInfo>();

            jC_Alarmnotificationpersonnelconfigresponse.Data = jC_Alarmnotificationpersonnelconfigrequest.JC_AlarmNotificationPersonnelConfigInfo;
            return(jC_Alarmnotificationpersonnelconfigresponse);
        }
 public BasicResponse <JC_AlarmNotificationPersonnelConfigInfo> UpdateJC_AlarmNotificationPersonnelConfig(AlarmNotificationPersonnelConfigUpdateRequest jC_Alarmnotificationpersonnelconfigrequest)
 {
     return(_AlarmNotificationPersonnelConfigService.UpdateJC_AlarmNotificationPersonnelConfig(jC_Alarmnotificationpersonnelconfigrequest));
 }
        public BasicResponse <JC_AlarmNotificationPersonnelConfigInfo> UpdateJC_AlarmNotificationPersonnelConfig(AlarmNotificationPersonnelConfigUpdateRequest jC_Alarmnotificationpersonnelconfigrequest)
        {
            var responseStr = HttpClientHelper.Post(Webapi + "/v1/AlarmNotificationPersonnelConfig/UpdateJC_AlarmNotificationPersonnelConfig?token=" + Token, JSONHelper.ToJSONString(jC_Alarmnotificationpersonnelconfigrequest));

            return(JSONHelper.ParseJSONString <BasicResponse <JC_AlarmNotificationPersonnelConfigInfo> >(responseStr));
        }