示例#1
0
        private void btnDeleteSaloon_Click(object sender, EventArgs e)
        {
            Saloons saloon = new Saloons
            {
                SaloonID = Convert.ToInt32(txtDeleteSaloon.Text.Trim())
            };

            SaloonsController saloonsController = new SaloonsController();

            bool IsSaloonDeleted = saloonsController.DeletesSaloon(saloon);

            if (IsSaloonDeleted)
            {
                string successMessage = "Salon silme başarılı.";
                MessageBox.Show(successMessage);
            }
            else
            {
                string failMessage = "Salon silme başarısız.";
                MessageBox.Show(failMessage);
            }
        }
示例#2
0
        private void btnInsertSaloon_Click(object sender, EventArgs e)
        {
            Saloons saloon = new Saloons
            {
                SaloonName     = txtInsertSaloon.Text.Trim(),
                SaloonCapacity = Convert.ToInt32(txtInsertSaloonCapacity.Text.Trim())
            };

            SaloonsController saloonsController = new SaloonsController();

            bool IsSaloonInserted = saloonsController.InsertsSaloon(saloon);

            if (IsSaloonInserted)
            {
                string successMessage = "Salon ekleme başarılı.";
                MessageBox.Show(successMessage);
            }
            else
            {
                string failMessage = "Salon ekleme başarısız.";
                MessageBox.Show(failMessage);
            }
        }