private void CreateFilm_Clicked(object sender, RoutedEventArgs e) { FilmInput filmInput = new FilmInput(); filmInput.Subscribe(this); filmInput.Show(); }
public void OnEdit_Clicked(object sender, RoutedEventArgs e) { currentOperation = Operations.EDIT; if (currentState == States.NONE) { return; } switch (currentState) { case States.FILMS: Film film = new Film( Int32.Parse(((DataRowView)DataGrid.SelectedItem).Row["fid"].ToString()), ((DataRowView)DataGrid.SelectedItem).Row["title"].ToString(), Int32.Parse(((DataRowView)DataGrid.SelectedItem).Row["budget"].ToString()), ((DataRowView)DataGrid.SelectedItem).Row["script"].ToString(), Int32.Parse(((DataRowView)DataGrid.SelectedItem).Row["did"].ToString()) ); FilmInput filmInput = new FilmInput(film); filmInput.Subscribe(this); filmInput.Show(); break; case States.ACTORS: Actor actor = new Actor( Int32.Parse(((DataRowView)DataGrid.SelectedItem).Row["aid"].ToString()), ((DataRowView)DataGrid.SelectedItem).Row["firstname"].ToString(), ((DataRowView)DataGrid.SelectedItem).Row["secondname"].ToString(), Int32.Parse(((DataRowView)DataGrid.SelectedItem).Row["experience"].ToString()) ); ActorInput actorInput = new ActorInput(actor); actorInput.Subscribe(this); actorInput.Show(); break; case States.DIRECTORS: Director director = new Director( Int32.Parse(((DataRowView)DataGrid.SelectedItem).Row["did"].ToString()), ((DataRowView)DataGrid.SelectedItem).Row["firstname"].ToString(), ((DataRowView)DataGrid.SelectedItem).Row["secondname"].ToString(), ((DataRowView)DataGrid.SelectedItem).Row["isCertified"].ToString().ToLower() ); DirectorInput directorInput = new DirectorInput(director); directorInput.Subscribe(this); directorInput.Show(); break; } }