예제 #1
0
        /// <summary>
        /// Adds the update.
        /// </summary>
        /// <param name="schedulerDto">The scheduler dto.</param>
        /// <returns>
        /// Newly added object
        /// </returns>
        private IHttpActionResult AddUpdate(TblSchedulerDto schedulerDto)
        {
            var result = new ResultMessage <TblSchedulerDto>();

            try
            {
                result = this.schedulerService.SaveOrUpdate(schedulerDto, this.UserId);
            }
            catch (Exception ex)
            {
                this.LoggerService.LogException(ex);
                result.Messages.Add(new Message(null, ex.Message));
            }

            return(this.CreateCustomResponse(result));
        }
예제 #2
0
 public IHttpActionResult Update([FromBody] TblSchedulerDto schedulerDto, long id)
 {
     schedulerDto.Id           = id;
     schedulerDto.LastExecuted = null;
     return(this.AddUpdate(schedulerDto));
 }
예제 #3
0
 public IHttpActionResult Add([FromBody] TblSchedulerDto schedulerDto)
 {
     return(this.AddUpdate(schedulerDto));
 }