Beispiel #1
0
        private void btnAgregarProduc_Click(object sender, EventArgs e)
        {
            if (txtProducto.Text.Equals(""))
            {
                MessageBox.Show("No se pueden deajar campos vacios");
            }
            else
            {
                try
                {
                    var cp = (Business)cmbProducto.SelectedItem;

                    ProductDAO.Nuevo(cp.id_Business, txtProducto.Text);
                    MessageBox.Show("producto agregado exitosamente",
                                    "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }