private void InitializeGradeLevel() { gradeLevels = new List <eSAR.GradeLevelServiceRef.GradeLevel>(gs.GetAllGradeLevels()); cmbGradeLevel.DataSource = gradeLevels; cmbGradeLevel.ValueMember = "GradeLev"; cmbGradeLevel.DisplayMember = "Description"; }
private void frmManageSubject_Load(object sender, EventArgs e) { LearningAreaServiceClient laService = new LearningAreaServiceClient(); GradeLevelServiceClient glService = new GradeLevelServiceClient(); gradeLevel = new List <GradeLevel>(glService.GetAllGradeLevels()); if (gradeLevel.Count < 1) { gvSubjects.Enabled = false; } colGradeLevel = new GridViewComboBoxColumn("GradeLevel"); //colGradeLevel colGradeLevel.HeaderText = "Grade Level"; colGradeLevel.FieldName = "GradeLevel"; colGradeLevel.ValueMember = "GradeLev"; colGradeLevel.DisplayMember = "Description"; colGradeLevel.Width = 115; colGradeLevel.DataSource = gradeLevel; gvSubjects.Columns.Add(colGradeLevel); if (Op.Equals("edit")) { SetFields(); SetSubjectGrid(); } if (Op.Equals("new")) { BindSubjectGrid(); } }
private void frmStudentDetails_Load(object sender, EventArgs e) { pvStudent.SelectedPage = pvStudent.Pages[0]; GradeLevelServiceClient glService = new GradeLevelServiceClient(); gradeLevel = new List<GradeLevel>(glService.GetAllGradeLevels()); cmbGradeLevel.DataSource = gradeLevel; cmbGradeLevel.ValueMember = "GradeLev"; cmbGradeLevel.DisplayMember = "Description"; if (Op.Equals("new")) { GenerateStudentID(); // txtAge.Text = calculateAge(dtDOB.Value).ToString(); } if (Op.Equals("edit")) { SetFields(); } }
private void frmManageSubject_Load(object sender, EventArgs e) { LearningAreaServiceClient laService = new LearningAreaServiceClient(); GradeLevelServiceClient glService = new GradeLevelServiceClient(); gradeLevel = new List<GradeLevel>(glService.GetAllGradeLevels()); colGradeLevel = new GridViewComboBoxColumn("GradeLevel"); colGradeLevel.HeaderText = "Grade Level"; colGradeLevel.FieldName = "GradeLevel"; colGradeLevel.ValueMember = "GradeLev"; colGradeLevel.DisplayMember = "Description"; colGradeLevel.Width = 110; colGradeLevel.DataSource = gradeLevel; gvSubjects.Columns.Add(colGradeLevel); if (Op.Equals("edit")) { SetFields(); SetSubjectGrid(); } if (Op.Equals("new")) { BindSubjectGrid(); gvSubjects.Enabled = false; btnSave.Enabled = false; this.Size = new Size(772, 485); } }