Exemplo n.º 1
0
      private void btnDeleteWeek_Click(object sender, EventArgs e)
      {
         DisplayWeeks displayWeek = new DisplayWeeks
         {
            DisplayWeeksID = Convert.ToInt32(txtDeleteWeek.Text.Trim())
         };

         DisplayWeeksController displayWeeksController = new DisplayWeeksController();

         bool IsWeekDeleted = displayWeeksController.DeletesDisplayWeeks(displayWeek);

         if (IsWeekDeleted)
         {
            string successMessage = "Hafta silme başarılı.";
            MessageBox.Show(successMessage);
         }
         else
         {
            string failMessage = "Hafta silme başarısız.";
            MessageBox.Show(failMessage);
         }
      }
Exemplo n.º 2
0
      private void btnInsertWeek_Click(object sender, EventArgs e)
      {
         DisplayWeeks displayWeek = new DisplayWeeks
         {
            WeekName = txtInsertWeek.Text.Trim()
         };

         DisplayWeeksController displayWeeksController = new DisplayWeeksController();

         bool IsWeekInserted = displayWeeksController.InsertsDisplayWeeks(displayWeek);

         if (IsWeekInserted)
         {
            string successMessage = "Hafta ekleme başarılı.";
            MessageBox.Show(successMessage);
         }
         else
         {
            string failMessage = "Hafta ekleme başarısız.";
            MessageBox.Show(failMessage);
         }
      }
Exemplo n.º 3
0
      private void btnUpdateWeek_Click(object sender, EventArgs e)
      {
         DisplayWeeks displayWeek = new DisplayWeeks
         {
            WeekName = txtUpdateWeekName.Text.Trim(),
            DisplayWeeksID = Convert.ToInt32(txtDisplayWeeksIDToBeUpdated.Text.Trim())
         };

         DisplayWeeksController displayWeeksController = new DisplayWeeksController();

         bool IsWeekUpdated = displayWeeksController.UpdatesDisplayWeeks(displayWeek);

         if (IsWeekUpdated)
         {
            string successMessage = "Hafta güncelleme başarılı.";
            MessageBox.Show(successMessage);
         }
         else
         {
            string failMessage = "Hafta güncelleme başarısız.";
            MessageBox.Show(failMessage);
         }
      }