public string insertDocumento(BusinessEntity.DocumentoBE pDocumentoBE) { string idDocumento = string.Empty; using (DbCommand cmd = dbAdeudosInversiones.GetStoredProcCommand(GetNameStoreProcedure.uspInsertDocumento)) { //cmd.CommandTimeout = 0; dbAdeudosInversiones.AddInParameter(cmd, "idInversion", DbType.String, pDocumentoBE.idInversion); dbAdeudosInversiones.AddInParameter(cmd, "ruta", DbType.String, pDocumentoBE.ruta); dbAdeudosInversiones.AddInParameter(cmd, "extension", DbType.String, pDocumentoBE.nombre.Substring(pDocumentoBE.nombre.LastIndexOf("."), pDocumentoBE.nombre.Length - pDocumentoBE.nombre.LastIndexOf("."))); dbAdeudosInversiones.AddInParameter(cmd, "observaciones", DbType.String, pDocumentoBE.observaciones); dbAdeudosInversiones.AddOutParameter(cmd, "idDocumento", DbType.String, 10); dbAdeudosInversiones.ExecuteNonQuery(cmd); if (dbAdeudosInversiones.GetParameterValue(cmd, "idDocumento") != DBNull.Value) { idDocumento = dbAdeudosInversiones.GetParameterValue(cmd, "idDocumento").ToString(); } return(idDocumento); } }
public string insertDocumento(BusinessEntity.DocumentoBE pDocumentoBE) { return(oDocumentoDA.insertDocumento(pDocumentoBE)); }