Ejemplo n.º 1
0
 protected void btnGuardar_Click(object sender, EventArgs e)
 {
     //si el codigoOperacion es Null es una edicion.
     if (Session["codigoOperacion"] == null)
     {
         oProveedorActual = (Proveedor)Session["proveedorActual"];
         ControladorGeneral.InsertarActualizarProveedor(oProveedorActual.Codigo, txtRazonSocial.Value, txtProvincia.Value, txtCiudad.Value, txtDireccion.Value, txtTelefono.Value, txtFax.Value, txtMail.Value, txtNroDocumento.Value, txtPersonaContacto.Value, txtNroCuentaBancaria.Value, txtBanco.Value, txtCBU.Value, txtObservacion.Value, 0, (int)cbTipoDocumento.SelectedItem.Value); //agregar tipo documento
     }
     //si el codigoOperacion es != null hago un insert.
     else
     {
         ControladorGeneral.InsertarActualizarProveedor(0, txtRazonSocial.Value, txtProvincia.Value, txtCiudad.Value, txtDireccion.Value, txtTelefono.Value, txtFax.Value, txtMail.Value, txtNroDocumento.Value, txtPersonaContacto.Value, txtNroCuentaBancaria.Value, txtBanco.Value, txtCBU.Value, txtObservacion.Value, 0, (int)cbTipoDocumento.SelectedItem.Value); //agregar tipo documento
     }
     Response.Redirect("listado.aspx");
 }