Пример #1
0
        private void LoadDDLs()
        {
            DBLayer db = new DBLayer();
            uiDropDownListClasses.DataSource = db.GetAllClass();
            uiDropDownListClasses.DataTextField = "ArName";
            uiDropDownListClasses.DataValueField = "ClassID";
            uiDropDownListClasses.DataBind();
            uiDropDownListClasses.SelectedIndex = 0;

            uiDropDownListClassRooms.DataSource = db.GetAllClassRoomsByClassID(Convert.ToInt32(uiDropDownListClasses.SelectedValue));
            uiDropDownListClassRooms.DataTextField = "ArName";
            uiDropDownListClassRooms.DataValueField = "ClassRoomID";
            uiDropDownListClassRooms.DataBind();
        }
 private void LoadDDLs()
 {
     DBLayer db = new DBLayer ();
     uiDropDownListClass.DataSource = db.GetAllClass();
     uiDropDownListClass.DataTextField = "ArName";
     uiDropDownListClass.DataValueField = "ClassID";
     uiDropDownListClass.DataBind();
 }
Пример #3
0
 private void BindData()
 {
     DBLayer db = new DBLayer();
     DataSet ds = new DataSet();
     ds = db.GetAllClass();
     uiGridViewClasses.DataSource = ds;
     uiGridViewClasses.DataBind();
 }