Exemplo n.º 1
0
        private void BtnAdcionar_Click(object sender, EventArgs e)
        {
            frmAdicionarMarca objMarcas = new frmAdicionarMarca();

            objMarcas.ShowDialog();
            if (objMarcas.marca.Nome != null)
            {
                this.marcasTableAdapter.Insert(objMarcas.marca.Nome, true, 1, 1, DateTime.Now, DateTime.Now);
            }

            this.marcasTableAdapter.CustomQuery(bancoDeDadosinnerJoinDataSet1.Marcas);
        }
Exemplo n.º 2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            frmAdicionarMarca addMarca = new frmAdicionarMarca();

            addMarca.ShowDialog();

            if (!string.IsNullOrEmpty(addMarca.marcaRow?.Nome))
            {
                this.marcasTableAdapter.Insert(
                    addMarca.marcaRow.Nome,
                    true,
                    1,
                    1,
                    DateTime.Now,
                    DateTime.Now);
            }
            this.marcasTableAdapter.CustomQuerry(this.querrysInnerJoinDataSet1.Marcas);
        }