Пример #1
0
        private void vsRecord_Click(object sender, EventArgs e)
        {
            optn = 2;
            Movie_Field instance = new Movie_Field();
            DataTable   tbl      = new DataTable();

            tbl = instance.Movie_Record();
            tjGridview.DataSource = tbl;
        }
Пример #2
0
        private void viInfo_add_Click(object sender, EventArgs e)
        {
            //creating the local object of the movie class to pass the value by calling the refernece of the variable
            Movie_Field instance = new Movie_Field();

            if (instance.Movie_Insert(viInfo_Name.Text, viInfo_points.Text, viInfo_year.Text, viInfo_cost.Text, viInfo_copies.Text, viInfo_Plot.Text, viInfo_Genre.Text) == 1)
            {
                viInfo_Genre.Text  = "";
                viInfo_Plot.Text   = "";
                viInfo_copies.Text = "";
                viInfo_cost.Text   = "";
                viInfo_year.Text   = "";
                viInfo_points.Text = "";
                viInfo_Name.Text   = "";

                DataTable tbl = new DataTable();
                tbl = instance.Movie_Record();
                tjGridview.DataSource = tbl;
            }
        }