protected void btnGuardar_Click(object sender, EventArgs e) { //si el codigoOperacion es Null es una edicion. if (Session["codigoOperacion"] == null) { oClienteActual = (Cliente)Session["clienteActual"]; ControladorGeneral.InsertarActualizarCliente(oClienteActual.Codigo, txtRazonSocial.Value, txtTelefono.Value, txtFax.Value, txtMail.Value, txtNroDocumento.Value, txtPersonaContacto.Value, txtNroCuentaBancaria.Value, txtBanco.Value, txtCBU.Value, txtObservacion.Value, 0, Convert.ToInt32(cbTipoDocumento.Value), txtCodigoConSCF.Value); //agregar tipo documento } //si el codigoOperacion es != null hago un insert. else { ControladorGeneral.InsertarActualizarCliente(0, txtRazonSocial.Value, txtTelefono.Value, txtMail.Value, txtFax.Value, txtNroDocumento.Value, txtPersonaContacto.Value, txtNroCuentaBancaria.Value, txtBanco.Value, txtCBU.Value, txtObservacion.Value, 0, Convert.ToInt32(cbTipoDocumento.Value), txtCodigoConSCF.Value); //agregar tipo documento } Response.Redirect("listado.aspx"); }