public BasicResponse <List <JC_AlarmNotificationPersonnelInfo> > AddJC_AlarmNotificationPersonnelList(AlarmNotificationPersonnelAddRequest jC_AlarmNotificationPersonnelrequest)
 {
     return(_AlarmNotificationPersonnelService.AddJC_AlarmNotificationPersonnelList(jC_AlarmNotificationPersonnelrequest));
 }
Esempio n. 2
0
        /// <summary>
        /// 批量新增
        /// </summary>
        /// <param name="jC_AlarmNotificationPersonnelrequest"></param>
        /// <returns></returns>
        public BasicResponse <List <JC_AlarmNotificationPersonnelInfo> > AddJC_AlarmNotificationPersonnelList(AlarmNotificationPersonnelAddRequest jC_AlarmNotificationPersonnelrequest)
        {
            DataTable dataTable = _Repository.QueryTable("global_AlarmNotificationPersonnelService_GetAlarmNotificationPersonnelListByAnalysisModelId", jC_AlarmNotificationPersonnelrequest.AnalysisModelId);

            List <JC_AlarmNotificationPersonnelModel> listResult = ObjectConverter.Copy <JC_AlarmNotificationPersonnelModel>(dataTable);
            var _jC_AlarmNotificationPersonnel = ObjectConverter.CopyList <JC_AlarmNotificationPersonnelInfo, JC_AlarmNotificationPersonnelModel>
                                                     (jC_AlarmNotificationPersonnelrequest.JC_AlarmNotificationPersonnelInfoList);

            try
            {
                TransactionsManager.BeginTransaction(() =>
                {
                    _Repository.DeleteJC_AlarmNotificationPersonnelList(listResult);

                    _Repository.AddJC_AlarmNotificationPersonnelList(_jC_AlarmNotificationPersonnel.ToList());
                });
            }
            catch
            {
            }

            var jC_AlarmNotificationPersonnelresponse = new BasicResponse <List <JC_AlarmNotificationPersonnelInfo> >();

            jC_AlarmNotificationPersonnelresponse.Data = jC_AlarmNotificationPersonnelrequest.JC_AlarmNotificationPersonnelInfoList;
            return(jC_AlarmNotificationPersonnelresponse);
        }
        public BasicResponse <List <JC_AlarmNotificationPersonnelInfo> > AddJC_AlarmNotificationPersonnelList(AlarmNotificationPersonnelAddRequest jC_AlarmNotificationPersonnelrequest)
        {
            var responseStr = HttpClientHelper.Post(Webapi + "/v1/AlarmNotificationPersonnel/AddJC_AlarmNotificationPersonnelList?token=" + Token, JSONHelper.ToJSONString(jC_AlarmNotificationPersonnelrequest));

            return(JSONHelper.ParseJSONString <BasicResponse <List <DataContract.JC_AlarmNotificationPersonnelInfo> > >(responseStr));
        }
Esempio n. 4
0
        public BasicResponse <JC_AlarmNotificationPersonnelInfo> AddJC_AlarmNotificationPersonnel(AlarmNotificationPersonnelAddRequest jC_AlarmNotificationPersonnelrequest)
        {
            var _jC_AlarmNotificationPersonnel        = ObjectConverter.Copy <JC_AlarmNotificationPersonnelInfo, JC_AlarmNotificationPersonnelModel>(jC_AlarmNotificationPersonnelrequest.JC_AlarmNotificationPersonnelInfo);
            var resultjC_AlarmNotificationPersonnel   = _Repository.AddJC_AlarmNotificationPersonnel(_jC_AlarmNotificationPersonnel);
            var jC_AlarmNotificationPersonnelresponse = new BasicResponse <JC_AlarmNotificationPersonnelInfo>();

            jC_AlarmNotificationPersonnelresponse.Data = ObjectConverter.Copy <JC_AlarmNotificationPersonnelModel, JC_AlarmNotificationPersonnelInfo>(resultjC_AlarmNotificationPersonnel);
            return(jC_AlarmNotificationPersonnelresponse);
        }