Example #1
0
        public int AddExperimentalPhaseLog(ExperimentalPhaseLogDTO dto)
        {
            int id = 0;

            try
            {
                log.Debug(ExperimentalPhaseLogDTO.FormatExperimentalPhaseLogDTO(dto));

                R_ExperimentalPhaseLog t = ExperimentalPhaseLogDTO.ConvertDTOtoEntity(dto);

                // add
                id = Repository.AddExperimentalPhaseLog(t);
                dto.ExperimentalPhaseLogId = id;

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

                throw;
            }

            return(id);
        }
Example #2
0
        public void DeleteExperimentalPhaseLog(ExperimentalPhaseLogDTO dto)
        {
            try
            {
                log.Debug(ExperimentalPhaseLogDTO.FormatExperimentalPhaseLogDTO(dto));

                R_ExperimentalPhaseLog t = ExperimentalPhaseLogDTO.ConvertDTOtoEntity(dto);

                // delete
                Repository.DeleteExperimentalPhaseLog(t);
                dto.IsDeleted = t.IsDeleted;

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

                throw;
            }
        }
Example #3
0
        public void UpdateExperimentalPhaseLog(ExperimentalPhaseLogDTO dto)
        {
            try
            {
                //Requires.NotNull(t);
                //Requires.PropertyNotNegative(t, "ExperimentalPhaseLogId");

                log.Debug(ExperimentalPhaseLogDTO.FormatExperimentalPhaseLogDTO(dto));

                R_ExperimentalPhaseLog t = ExperimentalPhaseLogDTO.ConvertDTOtoEntity(dto);

                // update
                Repository.UpdateExperimentalPhaseLog(t);

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

                throw;
            }
        }