Exemplo n.º 1
0
        private void btnNew_Click(object sender, RoutedEventArgs e)
        {
            frmMovie frmMovie = new frmMovie();

            frmMovie.ShowDialog();
            Initialize();
        }
Exemplo n.º 2
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            Button   btn      = (Button)sender;
            string   id       = btn.CommandParameter.ToString();
            frmMovie frmMovie = new frmMovie();

            frmMovie.MovieInstance = MovieRepository.GetMovie(id);
            frmMovie.ShowDialog();
            Initialize();
        }
Exemplo n.º 3
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            //Pegar id do filme
            frmMovie frmMovie = new frmMovie();

            frmMovie.MovieInstance = this.MovieInstance;
            frmMovie.ParentId      = ParentID.MovieData;
            frmMovie.ShowDialog();

            //Retorna valores da instância
            this.MovieInstance = frmMovie.MovieInstance;

            Initilize();
        }