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(); uiDropDownListSection.DataSource = db.GetAllSections(); uiDropDownListSection.DataTextField = "ARName"; uiDropDownListSection.DataValueField = "SectionID"; uiDropDownListSection.DataBind(); uiDropDownListSection.SelectedIndex = 0; }
private void BindData() { DBLayer db = new DBLayer(); DataSet ds = new DataSet(); ds = db.GetAllSections(); uiGridViewSections.DataSource = ds; uiGridViewSections.DataBind(); }