protected void GetFacultyInfo() { ResetForm(); if (RadGrid1.SelectedValue != null) { var cAgc = new CFaculty(); var agc = cAgc.Get(Convert.ToInt32(RadGrid1.SelectedValue)); if (agc.FacultyId > 0) { tbFaculty.Text = agc.Name; tbDescription.Text = agc.Description; RadButtonActive.Checked = agc.IsActive; if (RadToolBarFaculty.FindItemByText("New") != null) { RadToolBarFaculty.FindItemByText("New").Enabled = true; } if (RadToolBarFaculty.FindItemByText("Save") != null) { RadToolBarFaculty.FindItemByText("Save").Text = @"Update"; } } } }
protected void ResetForm() { tbFaculty.Text = ""; tbDescription.Text = ""; RadButtonActive.Checked = true; if (RadToolBarFaculty.FindItemByText("New") != null) { RadToolBarFaculty.FindItemByText("New").Enabled = false; } if (RadToolBarFaculty.FindItemByText("Update") != null) { RadToolBarFaculty.FindItemByText("Update").Text = @"Save"; } }