コード例 #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 btnSaveQuality_Click(object sender, EventArgs e)
        {
            QualityRepository rl = new QualityRepository();
            QualityTable      l  = new QualityTable();

            l.QualityName = txtQuality.Text;
            rl.AddQuality(l);
        }
コード例 #3
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();
            }
        }
コード例 #4
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();
            }
        }
コード例 #5
0
ファイル: BookService.cs プロジェクト: zynori/BookStore
 public BookService(BookRepository bookRepository, QualityRepository qualityRepository, FormatRepository formatRepository)
 {
     this.bookRepository    = bookRepository;
     this.qualityRepository = qualityRepository;
     this.formatRepository  = formatRepository;
 }