private void NewEmail(int idCliente) { EmailBE embe = new EmailBE( short.Parse(cboEmailTipo.SelectedValue.ToString()), idCliente, txtEmailEmail.Text.Trim() ); EmailsBL emailBL = new EmailsBL(); emailBL.EmailNew(embe); }
private void btnGuardar_Click(object sender, EventArgs e) { int idPersona = int.Parse(cboPersonas.SelectedValue.ToString()); EmailBE emBE = new EmailBE(short.Parse(cboEmailTipo.SelectedValue.ToString()), idPersona, txtEmailEmail.Text.Trim()); EmailsBL emBL = new EmailsBL(); if (emBL.EmailNew(emBE) == true) { MessageBox.Show(this, "Se guardo correctamente", "Alerta", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show(this, "OcurriĆ³ un error", "Alerta", MessageBoxButtons.OK, MessageBoxIcon.Error); } }