public bool ActualizarDomicilio() { using (SqlConnection conexion = new SqlConnection()) { SqlTransaction transaccion = null; conexion.ConnectionString = Config.ConnectionString; try { conexion.Open(); transaccion = conexion.BeginTransaction(); Domicilio domicilio = this.oDomicilioRetiroEntrega; domicilio.Guardar(transaccion); /* Actualizar el domicilio de retiro entrega */ Config.Conexion.EjecutarSinResultados(transaccion, "GuiaFacturaRetiroEntregaUPDDomicilio", this.GuiaID, (int)this.TipoRetiroEntregaID, Utiles.BaseDatos.IntToSql(Convert.ToInt32(domicilio.DomicilioID.ToString()))); domicilio = null; transaccion.Commit(); return(true); } catch (Exception ex) { transaccion.Rollback(); throw ex; } } }
public void ConsultarOrden() { DsDestinatario ds = new DsDestinatario(); if (DestinatarioID != 0) { SqlParameter pDestinatarioID = new SqlParameter("@DestinatarioID", this.DestinatarioID); Config.Conexion.LlenarTypeDataSet(ds.Datos, System.Data.CommandType.StoredProcedure, "DestinatarioOrdenONE", pDestinatarioID); if (ds.Datos.Rows.Count > 0) { DsDestinatario.DatosRow dr = (DsDestinatario.DatosRow)ds.Datos.Rows[0]; this.ClienteID = dr.IsClienteIDNull() ? 0 : dr.ClienteID; this.DestinatarioID = dr.DestinatarioID; this.Nombre = dr.IsNombreNull() ? "" : dr.Nombre; this.Apellido = dr.IsApellidoNull() ? "" : dr.Apellido; this.CondicionIVAID = dr.IsCondicionIVAIDNull() ? 0 : dr.CondicionIVAID; this.NroCUIT = dr.IsNroCUITNull() ? "" : dr.NroCUIT; this.NroDocumento = dr.IsNroDocumentoNull() ? 0 : dr.NroDocumento; this.TipoDocumentoID = dr.IsTipoDocumentoIDNull() ? 0 : dr.TipoDocumentoID; Domicilio.OrdenRetiroDomicilioID = dr.IsOrdenRetiroDomicilioIDNull() ? 0 : dr.OrdenRetiroDomicilioID; Domicilio.Consultar(); ClienteEventual.ClienteEventualID = dr.IsClienteEventualNull() ? 0 : dr.ClienteEventual; if (ClienteEventual.ClienteEventualID != 0) { ClienteEventual.Consultar(); } /***************PRUEBA CORPORATIVOS**************************/ this.ClienteCorporativo.ClienteID = dr.IsClienteIDNull() ? 0 : dr.ClienteID; if (ClienteCorporativo.ClienteID != 0) { ClienteCorporativo.Consultar(); } } } }