Example #1
0
        private void buttonAddBrandShoe_Click(object sender, EventArgs e)
        {
            var brandBrandShoeName = textBoxBrandShoeName.Text;
            var brandCountryShoe   = textBoxCountryShoe.Text;

            BrandShoes brandShoe = new BrandShoes
            {
                BrandName = brandBrandShoeName,
                Country   = brandCountryShoe
            };

            _brandsShoe.Create(brandShoe);
            _brandsShoe.Save();

            LoadBrandsShoe();
        }
Example #2
0
        private void buttonEditBrandShoe_Click(object sender, EventArgs e)
        {
            var selectedBrandShoeIndex = Int32.Parse(dataGridViewBrandsShoe.SelectedRows[0].Cells[0].Value.ToString());


            _brandsShoe.DeleteById(selectedBrandShoeIndex);
            _brandsShoe.Save();
            LoadBrandsShoe();
            var brandBrandShoeName = textBoxBrandShoeName.Text;
            var brandCountryShoe   = textBoxCountryShoe.Text;

            BrandShoes brandShoe = new BrandShoes
            {
                BrandName = brandBrandShoeName,
                Country   = brandCountryShoe
            };

            _brandsShoe.Create(brandShoe);
            _brandsShoe.Save();

            LoadBrandsShoe();
        }