Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 protected abstract LineDto InsertImpl(LineDto dto);
Ejemplo n.º 4
0
 protected abstract LineDto UpdateImpl(LineDto dto);
Ejemplo n.º 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;
        }
Ejemplo n.º 6
0
 protected abstract LineDto UpdateImpl(LineDto dto);
Ejemplo n.º 7
0
 protected abstract LineDto InsertImpl(LineDto dto);
Ejemplo n.º 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;
        }