protected void ResetForm() { LoadFaculty(); tbProgram.Text = ""; tbDescript.Text = ""; RadButtonActive.Checked = true; RadToolBarProgramGroup.FindItemByText("New").Enabled = false; if (RadToolBarProgramGroup.FindItemByText("Update") != null) { RadToolBarProgramGroup.FindItemByText("Update").Text = "Save"; } }
protected void ResetForm() { LoadFaculty(); LoadProgramGroup(null); LoadProgram(null); RadTextBoxProgramCourse.Text = string.Empty; RadTextBoxDescription.Text = string.Empty; RadButtonActive.Checked = true; RadToolBarProgramGroup.FindItemByText("New").Enabled = false; if (RadToolBarProgramGroup.FindItemByText("Update") != null) { RadToolBarProgramGroup.FindItemByText("Update").Text = "Save"; } }
protected void GetProgramCourseLevel() { ResetForm(); if (Grid.SelectedValue != null) { var c = new CProgramCourseLevel().Get(Convert.ToInt32(Grid.SelectedValue)); if (c != null) { var programCourse = new CProgramCourse().Get(c.ProgramCourseId); if (programCourse != null) { var program = new CProgram().Get(programCourse.ProgramId); if (program != null) { if (program.ProgramGroupId != null) { var programGroup = new CProgramGroup().Get(Convert.ToInt32(program.ProgramGroupId)); if (programGroup != null) { RadComboBoxFaculty.SelectedValue = programGroup.FacultyId.ToString(); LoadProgramGroup(RadComboBoxFaculty.SelectedValue); } RadComboBoxProgramGroup.SelectedValue = program.ProgramGroupId.ToString(); LoadProgram(RadComboBoxProgramGroup.SelectedValue); } RadComboBoxProgram.SelectedValue = program.ProgramId.ToString(); LoadProgramCourse(RadComboBoxProgram.SelectedValue); } } RadTextBoxProgramCourseLevel.Text = c.Level; RadTextBoxDescription.Text = c.Description; RadButtonActive.Checked = c.IsActive; } RadToolBarProgramGroup.FindItemByText("New").Enabled = true; if (RadToolBarProgramGroup.FindItemByText("Save") != null) { RadToolBarProgramGroup.FindItemByText("Save").Text = "Update"; } } }
protected void GetProgram() { ResetForm(); if (Grid.SelectedValue != null) { var cProg = new CProgramGroup(); var prog = cProg.Get(Convert.ToInt32(Grid.SelectedValue)); RadComboBoxFaculty.SelectedValue = prog.FacultyId.ToString(); tbProgram.Text = prog.Name; tbDescript.Text = prog.Description; RadButtonActive.Checked = prog.IsActive; RadToolBarProgramGroup.FindItemByText("New").Enabled = true; if (RadToolBarProgramGroup.FindItemByText("Save") != null) { RadToolBarProgramGroup.FindItemByText("Save").Text = "Update"; } } }