protected void btnIngreso_Click(object sender, EventArgs e)
        {
            try
            {
                if (Page.IsValid)
                {
                    panelMensaje.CssClass = "OcultarMensaje";

                    if (!string.IsNullOrEmpty(txtRut.Text))
                        if (!ValidaRut(txtRut.Text))
                            throw new Exception("Rut no es valido");

                    string rut = !string.IsNullOrEmpty(txtRut.Text) ? txtRut.Text : string.Empty;
                    string fono = !string.IsNullOrEmpty(txtFono.Text) ? txtFono.Text : string.Empty;
                    string nombre = !string.IsNullOrEmpty(txtNombre.Text) ? txtNombre.Text : string.Empty;
                    string direccion = !string.IsNullOrEmpty(txtDireccion.Text) ? txtDireccion.Text : string.Empty;
                    string giro = !string.IsNullOrEmpty(txtGiro.Text) ? txtGiro.Text : string.Empty;
                    int? descuento = null;
                    if (!string.IsNullOrEmpty(txtDescuento.Text))
                    {
                        descuento = int.Parse(txtDescuento.Text);
                    }
                    int comuna = int.Parse(ddlComuna.SelectedValue);
                    int tipoPrestacion = int.Parse(ddlTipoPrestacion.SelectedValue);
                    int convenio = int.Parse(ddlConvenio.SelectedValue);
                    int tipoFactura = int.Parse(ddlTipoFactura.SelectedValue);

                    var cliente = new TrxCLIENTE();
                    var ingreso = cliente.Add(comuna, convenio, tipoPrestacion, tipoFactura, rut, nombre, descuento, direccion, fono, giro);
                    var ingreso_sinonimo = 0;

                    /*guardar datos del cliente sinonimo desde la grilla*/
                    foreach (var item in _listaClienteSinonimo)
                    {
                        var trxClienteSinonimo = new TrxCLIENTE_SINONIMO();
                        ingreso_sinonimo = trxClienteSinonimo.Add(ingreso, item.NOMBRE);
                    }

                    //se despliega mensaje de exito
                    if (ingreso > 0 && ingreso_sinonimo > 0)
                        Response.Redirect("MensajeExito.aspx?t=Ingreso Clientes&m=Se ha registrado un nuevo cliente", false);
                    else if (ingreso == 0)
                        Response.Redirect("MensajeError.aspx?t=Ingreso Clientes&m=Ha ocurrido un error al ingresar el cliente", false);
                    else if (ingreso_sinonimo == 0)
                        Response.Redirect("MensajeError.aspx?t=Ingreso Cliente_Sinonimo&m=Ha ocurrido un error al ingresar el Sinonimo del cliente", false);
                }
            }
            catch (Exception ex)
            {
                ISException.RegisterExcepcion(ex);
                panelMensaje.CssClass = "MostrarMensaje";
                lblMensaje.Text = ex.Message;
                return;
            }
        }