Ejemplo n.º 1
0
        protected void DropDownListClass_SelectedIndexChanged(object sender, EventArgs e)
        {
            string tenLop = (string)DropDownListClass.SelectedValue;

            GridViewSinhVien.DataSource = SinhVienAndPoint.getSinhVienAndPointByClassID(tenLop);
            GridViewSinhVien.DataBind();
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Admin"] == null)
            {
                return;
            }
            Admin a = (Admin)Session["Admin"];

            LabelUserName.Text = a.MaGv1;
            if (!IsPostBack)
            {
                DropDownListClass.DataTextField  = "TenLop";
                DropDownListClass.DataValueField = "MaLop";
                DropDownListClass.DataSource     = Lop.getAllClass();
                DropDownListClass.DataBind();

                GridViewSinhVien.DataSource = SinhVien.getAllSinhVien();
                GridViewSinhVien.DataBind();

                DropDownListKhoa.DataTextField  = "TenKhoa1";
                DropDownListKhoa.DataValueField = "MaKhoa1";
                DropDownListKhoa.DataSource     = Khoa.GetKhoas();
                DropDownListKhoa.DataBind();
            }
        }