Example #1
0
        private void bttn_aceptar_Click(object sender, EventArgs e)
        {
            if (this.txt_tipo.Text == "")
            {
                MessageBox.Show("No se ingresó ningún dato", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Error);
                txt_tipo.Focus();
            }
            else
            {
                if (tipoCamaroteService.GetByName(this.txt_tipo.Text).Count == 0)
                {
                    string nombre = this.txt_tipo.Text;

                    TipoCamarote tipoCamarote = new TipoCamarote(nombre);
                    tipoCamaroteService.CreateTipoCamarote(tipoCamarote);
                    MessageBox.Show("Se creó el tipo de camarote " + nombre + " Exitosamente.", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    this.Close();
                }
                else
                {
                    MessageBox.Show("El  puerto ya existe", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Example #2
0
 internal void CreateTipoCamarote(TipoCamarote tipoCamarote)
 {
     tipoCamaroteRepository.Create(tipoCamarote);
 }