public IB.SUPER.SIC.Models.DocumentacionPreventa Insert(IB.SUPER.SIC.Models.DocumentacionPreventa oDoc) { BLL.DocumentacionPreventa cDP = new BLL.DocumentacionPreventa(); try { int ta210_iddocupreventa = cDP.Insert(oDoc); return(cDP.Select(ta210_iddocupreventa)); } catch (ValidationException vex) { throw new ValidationException(System.Uri.EscapeDataString(vex.Message)); } catch (Exception ex) { LogError.LogearError("Ocurrió un error adjuntando el nuevo documento", ex); throw new Exception(System.Uri.EscapeDataString("Ocurrió un error adjuntando el nuevo documento")); } finally { cDP.Dispose(); } }
public IB.SUPER.SIC.Models.DocumentacionPreventa Update(IB.SUPER.SIC.Models.DocumentacionPreventa oDoc) { BLL.DocumentacionPreventa cDP = new BLL.DocumentacionPreventa(); try { cDP.Update(oDoc); return(cDP.Select(oDoc.ta210_iddocupreventa)); } catch (ValidationException vex) { throw new ValidationException(System.Uri.EscapeDataString(vex.Message)); } catch (Exception ex) { LogError.LogearError("Ocurrió un error actualizando las propiedades del documento", ex); throw new Exception(System.Uri.EscapeDataString("Ocurrió un error actualizando las propiedades del documento")); } finally { cDP.Dispose(); } }