示例#1
0
        public int AddCheckpoint(CheckpointDTO dto)
        {
            int id = 0;

            try
            {
                log.Debug(CheckpointDTO.FormatCheckpointDTO(dto));

                R_Checkpoint t = CheckpointDTO.ConvertDTOtoEntity(dto);

                // add
                id = Repository.AddCheckpoint(t);
                dto.CheckpointId = id;

                log.Debug("result: 'success', id: " + id);
            }
            catch (System.Exception e)
            {
                // error
                log.Error(e.ToString());

                throw;
            }

            return(id);
        }