예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            myQuanlyhocEntities = new QuanlyhocEntities1();
            var mySql = from i in myQuanlyhocEntities.KhoaDaoTaos
                        select i;

            GridView1.DataSource = mySql.ToList();
            GridView1.DataBind();
        }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     myQuanlyhocEntities = new QuanlyhocEntities1();
     if (!IsPostBack)
     {
         var sQuery = from i in myQuanlyhocEntities.SinhViens
                      select i;
         ddlMaSV.DataSource     = sQuery.ToList();
         ddlMaSV.DataValueField = "MaSV";
         ddlMaSV.DataBind();
         ddlMaSV_SelectedIndexChanged(sender, e);
     }
 }
예제 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     myQuanlyhocEntities = new QuanlyhocEntities1();
     if (!IsPostBack)
     {
         var myQuery = from i in myQuanlyhocEntities.KhoaDaoTaos
                       select i;
         ddlKhoa.DataSource     = myQuery.ToList();
         ddlKhoa.DataTextField  = "TenKhoa";
         ddlKhoa.DataValueField = "MaKhoa";
         ddlKhoa.DataBind();
         ddlKhoa_SelectedIndexChanged(sender, e);
     }
 }