示例#1
0
        private void UpdateButton_Click(object sender, EventArgs e)
        {
            percentList.Percents[indexRow].PercentType        = DiscountOrMarkupInput.Text;
            percentList.Percents[indexRow].PercentDescription = DescriptionInput.Text;
            percentList.Percents[indexRow].PercentValue       = Convert.ToInt32(PercentInput.Text);
            UpdatingDataBase updating = new UpdatingDataBase();

            updating.UpdateInDatabase(percentList.Percents[indexRow]);
            sourceData.ResetBindings(false); //подтверждает изменения
        }
示例#2
0
        private void UpdateButton_Click(object sender, EventArgs e)
        {
            filmsList.Films[indexRow].FilmName     = NameFilmInput.Text;
            filmsList.Films[indexRow].LengthOfFilm = Convert.ToInt32(FilmLengthInput.Text);
            filmsList.Films[indexRow].AgeLimit     = Convert.ToInt32(AgeLimitInput.Text);
            filmsList.Films[indexRow].Price        = Convert.ToInt32(PriceInput.Text);
            UpdatingDataBase updating = new UpdatingDataBase();

            updating.UpdateInDatabase(filmsList.Films[indexRow]);
            sourceData.ResetBindings(false); //подтверждает изменения
        }
示例#3
0
        private void UpdateButton_Click(object sender, EventArgs e)
        {
            sessionsList.Sessions[indexRow].FilmSession = filmList.Films.Find(x => x.FilmName == FilmComboBox.Text);
            sessionsList.Sessions[indexRow].HallSession = hallList.Halls.Find(x => x.HallName == HallComboBox.Text);
            sessionsList.Sessions[indexRow].DateSession = DateInputPicker.Value;
            sessionsList.Sessions[indexRow].TimeSession = TimeInputPicker.Value.TimeOfDay;
            UpdatingDataBase updating = new UpdatingDataBase();

            updating.UpdateInDatabase(sessionsList.Sessions[indexRow]);
            LoadDataGridView();
        }
示例#4
0
        private void UpdateButton_Click(object sender, EventArgs e)
        {
            cashiersList.Cashiers[indexRow].LastName   = LastNameInput.Text;
            cashiersList.Cashiers[indexRow].FirstName  = FirstNameInput.Text;
            cashiersList.Cashiers[indexRow].SecondName = SecondNameInput.Text;
            cashiersList.Cashiers[indexRow].Login      = LoginInput.Text;
            cashiersList.Cashiers[indexRow].Password   = PasswordInput.Text;
            UpdatingDataBase updating = new UpdatingDataBase();

            updating.UpdateInDatabase(cashiersList.Cashiers[indexRow]);
            sourceData.ResetBindings(false); //подтверждает изменения
        }
示例#5
0
 private void UpdateButton_Click(object sender, EventArgs e)
 {
     if (indexRow != -1)
     {
         hallsList.Halls[indexRow].HallName        = NameHallInput.Text;
         hallsList.Halls[indexRow].PlacesInRow     = Convert.ToInt32(PlacesInRowInput.Text);
         hallsList.Halls[indexRow].SeatingCapacity = Convert.ToInt32(SeatingCapacityInput.Text);
         UpdatingDataBase updating = new UpdatingDataBase();
         updating.UpdateInDatabase(hallsList.Halls[indexRow]);
         sourceData.ResetBindings(false); //подтверждает изменения
         HallPlaces.Controls.Clear();
         DeletingFromDateBase deleting = new DeletingFromDateBase();
         deleting.DeleteFromDatabase(hallsList.Halls[indexRow].Places);
         hallsList.Halls[indexRow].Places.Clear();
         ReadingFromDateBase reading = new ReadingFromDateBase();
         placesList = reading.ReadAllPlacesOfAllHalls();
         FillingPlaces(hallsList.Halls[indexRow]);
         LoadSchemeOfHall(hallsList.Halls[indexRow].SeatingCapacity, hallsList.Halls[indexRow].PlacesInRow);
     }
 }