コード例 #1
0
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            var sql = $"DELETE FROM APPUSER WHERE username = '******'";

            Conection.DoAction(sql);
            MessageBox.Show("Eliminado");
            this.Hide();
            new MainMenu().Show();
        }
コード例 #2
0
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            var sql = $"DELETE FROM APPORDER WHERE idOrder = {txtIDOrder.Text}";

            Conection.DoAction(sql);
            MessageBox.Show("Eliminado");
            this.Hide();
            new MainMenuRegular().Show();
        }
コード例 #3
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            var sql =
                $"INSERT INTO APPORDER (createDate, idProduct, idAddress) VALUES('26-05-2020',{txtIDProduct.Text}, {txtIDAddress.Text})";

            //
            Conection.DoAction(sql);
            MessageBox.Show("Agregado");
            this.Hide();
            new MainMenuRegular().Show();
        }
コード例 #4
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            var sql =
                $"INSERT INTO PRODUCT (name, idBusiness) VALUES('{txtName.Text}', {txtIDNegocio.Text})";

            //
            Conection.DoAction(sql);
            MessageBox.Show("Agregado");
            this.Hide();
            new MainMenu().Show();
        }
コード例 #5
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            var sql =
                $"INSERT INTO ADDRESS (address, idUser) VALUES('{txtAddress.Text}', {txtIDUser.Text})";

            //
            Conection.DoAction(sql);

            MessageBox.Show("Agregado");
            this.Hide();
            new MainMenuRegular().Show();
        }
コード例 #6
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            var sql =
                $"INSERT INTO BUSINESS (name, description) VALUES('{txtName.Text}', '{txtDescription.Text}')";

            //
            Conection.DoAction(sql);

            MessageBox.Show("Agregado");
            this.Hide();
            new MainMenu().Show();
        }
コード例 #7
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            bool usrtype;

            if (chkAdmin.CheckState == (CheckState)1)
            {
                usrtype = true;
            }
            else
            {
                usrtype = false;
            }

            var sql =
                $"INSERT INTO APPUSER (fullname, username, password, userType) VALUES('{txtName.Text}', '{txtUser.Text}', '{txtPassword.Text}', {usrtype})";

            //
            Conection.DoAction(sql);
            MessageBox.Show("Agregado");
            this.Hide();
            new MainMenu().Show();

            //MessageBox.Show(chkAdmin.ToString());
        }