private void MainPage_Load(object sender, EventArgs e) { ///assign current logged user if (UserManager.instance != null) { currUser = UserManager.instance.currentUser; IssueBtn.Enabled = currUser.IssueDocument; officialTSBtn.Enabled = currUser.Username == "ninotech"; } ///activate addnew log in button depending on user privileges //AddNewLoginBtn.Enabled = curr.canAddUser ? true : false; ///set the text to userwelcome text currUserBtn.Text = currUser.Username; Current = DashControl; //printingFiles.OpeningForm += (x, y) => { Enabled = !y; }; try { DashControl.InitValues(); QueryPage.setUser(); complaintPage.LoadValues(); complaintPage.InitButtons(); } catch { } }
void refresh() { DashControl.InitValues(); QueryPage.showData(); }