Beispiel #1
0
        //Genres, Services, Types Controls
        /// <summary>
        /// Създава формата за добавяне на жанрове, услуги и типове
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void addData(object sender, EventArgs e)
        {
            Button b = sender as Button;

            switch (b.Name)
            {
            case "genreButton":
            {
                AddDataMenu menu = new AddDataMenu("Genres", row, true);
                menu.Show();
                break;
            }

            case "serviceButton":
            {
                AddDataMenu menu = new AddDataMenu("Services", row, true);
                menu.Show();
                break;
            }

            case "typeButton":
            {
                AddDataMenu menu = new AddDataMenu("Types", row, true);
                menu.Show();
                break;
            }
            }
        }
Beispiel #2
0
 /// <summary>
 /// Създава формата за промяна на жанрове, услуги и типове
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void changeData(object sender, EventArgs e)
 {
     if (allGenreView.SelectedItems.Count != 0)
     {
         AddDataMenu menu = new AddDataMenu("Genres", genreRow, false);
         genreRow = "";
         menu.Show();
         allGenreView.SelectedItems.Clear();
     }
     else if (allServicesView.SelectedItems.Count != 0)
     {
         AddDataMenu menu = new AddDataMenu("Services", servicesRow, false);
         servicesRow = "";
         menu.Show();
         allServicesView.SelectedItems.Clear();
     }
     else if (allTypesView.SelectedItems.Count != 0)
     {
         AddDataMenu menu = new AddDataMenu("Types", typesRow, false);
         typesRow = "";
         menu.Show();
         allTypesView.SelectedItems.Clear();
     }
 }