Example #1
0
        private void AƱadirProducto_Load(object sender, EventArgs e)
        {
            var business      = ConectionDb.ExecuteQuery("SELECT name FROM BUSINESS");
            var businessCombo = new List <String>();

            foreach (DataRow dr in business.Rows)
            {
                businessCombo.Add(dr[0].ToString());
            }
        }
Example #2
0
 private void Agregar_Click(object sender, EventArgs e)
 {
     if (textBox1.Text.Equals(""))
     {
         MessageBox.Show("Error! tiene que llenar todos los campos");
     }
     else
     {
         try
         {
             ConectionDb.ExecuteNonQuery($"INSERT INTO ADDRESS VALUES(" +
                                         $"'{textBox1.Text}')");
         }
         catch (Exception ex)
         {
             MessageBox.Show("Ha sucedido un error");
         }
     }
 }
Example #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text.Equals(""))
     {
         MessageBox.Show("Error! tiene que llenar todos los campos");
     }
     else
     {
         try
         {
             ConectionDb.ExecuteNonQuery($"INSERT INTO PRODUCTO VALUES(" +
                                         $"'{textBox1.Text}");
             MessageBox.Show("Se ha registrado el usuario");
         }
         catch (Exception ex)
         {
             MessageBox.Show("Ha sucedido un error");
         }
     }
 }
Example #4
0
 private void AgregarB(object sender, EventArgs e)
 {
     if (textBox1.Text.Equals("") || textBox2.Equals(""))
     {
         MessageBox.Show("Error! tiene que llenar todos los campos");
     }
     else
     {
         try
         {
             ConectionDb.ExecuteNonQuery($"INSERT INTO BUSINESS VALUES(" +
                                         $"'{textBox1.Text}', '{textBox2.Text}')");
             MessageBox.Show("Se ha registrado el Negocio");
         }
         catch (Exception ex)
         {
             MessageBox.Show("Ha sucedido un error");
         }
     }
 }
Example #5
0
        private void Agregar_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Equals("") || textBox2.Equals("") || textBox3.Text.Equals(""))
            {
                MessageBox.Show("Error! tiene que llenar todos los campos");
            }

            else
            {
                try
                {
                    ConectionDb.ExecuteNonQuery($"INSERT INTO APPUSER VALUES(" +
                                                $"'{textBox1.Text}', '{textBox2.Text}', " +
                                                $"'{textBox3.Text}')");

                    MessageBox.Show("Se ha creado la cuenta con exito");
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Ha ocurrido un error!");
                }
            }
        }