protected void btnAgregar_Click(object sender, EventArgs e) { { if (txtMail.Text == "") { string mensaje = "Falta ingresar Mail"; ((ErrorWeb)this.phErrores.Controls[0]).setMensaje(mensaje); return; } else { ICliente cliente = ClienteFactory.GetCliente(); DsClienteMailOperativo ds = new DsClienteMailOperativo(); cliente.ClienteID = Convert.ToInt32(Convert.ToInt32(hdnCotizacionClienteID.Value)); ds = cliente.validarCli(); if (ds.Datos.Count > 0) { cliente.ClienteID = Convert.ToInt32(Convert.ToInt32(hdnCotizacionClienteID.Value)); cliente.MailOPerativo = txtMail.Text; cliente.ActualizarMailOPerativo(); txtMail.Text = ""; } else { string mensaje = "El cliente seleccionado no tiene la opcion de envio de mail operativo habilitada."; ((ErrorWeb)this.phErrores.Controls[0]).setMensaje(mensaje); return; } BindGrid(); } } }