예제 #1
0
        public Result <LineDto> Insert(LineDto dtoToInsert)
        {
            Result <LineDto> retResult = Result <LineDto> .Undefined(null);

            try
            {
                Common.CommonHelper.CheckAuthentication();

                var insertedDto = InsertImpl(dtoToInsert);
                retResult = Result <LineDto> .Success(insertedDto);
            }
            catch (Exception ex)
            {
                var wrappedEx = new Exceptions.InsertFailedException(ex);
                retResult = Result <LineDto> .FailureWithInfo(null, wrappedEx);
            }
            return(retResult);
        }
예제 #2
0
        public Result <LineDto> Update(LineDto dtoToUpdate)
        {
            Result <LineDto> retResult = Result <LineDto> .Undefined(null);

            try
            {
                Common.CommonHelper.CheckAuthentication();

                var updatedDto = UpdateImpl(dtoToUpdate);
                retResult = Result <LineDto> .Success(updatedDto);
            }
            catch (Exception ex)
            {
                var wrappedEx = new Exceptions.UpdateFailedException(ex);
                retResult = Result <LineDto> .FailureWithInfo(null, wrappedEx);
            }
            return(retResult);
        }
예제 #3
0
 protected abstract LineDto InsertImpl(LineDto dto);
예제 #4
0
 protected abstract LineDto UpdateImpl(LineDto dto);
예제 #5
0
        public Result<LineDto> Insert(LineDto dtoToInsert)
        {
            Result<LineDto> retResult = Result<LineDto>.Undefined(null);
              try
              {
            Common.CommonHelper.CheckAuthentication();

            var insertedDto = InsertImpl(dtoToInsert);
            retResult = Result<LineDto>.Success(insertedDto);
              }
              catch (Exception ex)
              {
            var wrappedEx = new Exceptions.InsertFailedException(ex);
            retResult = Result<LineDto>.FailureWithInfo(null, wrappedEx);
              }
              return retResult;
        }
예제 #6
0
 protected abstract LineDto UpdateImpl(LineDto dto);
예제 #7
0
 protected abstract LineDto InsertImpl(LineDto dto);
예제 #8
0
        public Result<LineDto> Update(LineDto dtoToUpdate)
        {
            Result<LineDto> retResult = Result<LineDto>.Undefined(null);
              try
              {
            Common.CommonHelper.CheckAuthentication();

            var updatedDto = UpdateImpl(dtoToUpdate);
            retResult = Result<LineDto>.Success(updatedDto);
              }
              catch (Exception ex)
              {
            var wrappedEx = new Exceptions.UpdateFailedException(ex);
            retResult = Result<LineDto>.FailureWithInfo(null, wrappedEx);
              }
              return retResult;
        }