Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lanrepo  = new LanguageRepository();
                qualrepo = new QualityRepository();
                genrepo  = new GenreRepository();

                List <LanguageTable> lan  = lanrepo.GetAllLanguages();
                List <GenreTable>    gen  = genrepo.GetAllGenres();
                List <QualityTable>  qual = qualrepo.GetAllQualities();

                DropDownList6.DataSource     = lan;
                DropDownList6.DataTextField  = "LanguageName";
                DropDownList6.DataValueField = "LanguageID";
                DropDownList6.DataBind();

                DropDownList7.DataSource     = qual;
                DropDownList7.DataTextField  = "QualityName";
                DropDownList7.DataValueField = "QualityID";
                DropDownList7.DataBind();

                DropDownList8.DataSource     = gen;
                DropDownList8.DataTextField  = "GenreName";
                DropDownList8.DataValueField = "GenreID";
                DropDownList8.DataBind();
            }
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                QualityRepository br = new QualityRepository();
                List <MRSLibrary.Database.QualityTable> lst = new List <MRSLibrary.Database.QualityTable>();
                lst = br.GetAllQualities();


                GridView1.DataSource = lst;
                GridView1.DataBind();
            }
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Session["UserID"] = 0;

                movrepo = new MovieRepository();
                List <MoviesGridData> mov = movrepo.GetMoviesForGrid();

                GridView1.DataSource = mov;
                GridView1.DataBind();

                lanrepo = new LanguageRepository();
                movrepo = new MovieRepository();
                qulrepo = new QualityRepository();
                genrepo = new GenreRepository();

                List <LanguageTable> lan  = lanrepo.GetAllLanguages();
                List <GenreTable>    gen  = genrepo.GetAllGenres();
                List <QualityTable>  qual = qulrepo.GetAllQualities();
                List <ReleaseYear>   yr   = movrepo.GetYears();

                DropDownList1.DataSource     = lan;
                DropDownList1.DataTextField  = "LanguageName";
                DropDownList1.DataValueField = "LanguageID";
                DropDownList1.DataBind();

                DropDownList2.DataSource     = qual;
                DropDownList2.DataTextField  = "QualityName";
                DropDownList2.DataValueField = "QualityID";
                DropDownList2.DataBind();

                DropDownList3.DataSource     = gen;
                DropDownList3.DataTextField  = "GenreName";
                DropDownList3.DataValueField = "GenreID";
                DropDownList3.DataBind();

                DropDownList4.DataSource = yr;
                DropDownList4.DataBind();
            }
        }