示例#1
0
 public void ShowAccounts()
 {
     AccountsView.Visible = true;
     AccountsView.ResetDataGridView();
     AccountsView.DataSource = AccountsDataSet;
     AccountsView.DataMember = AccountTable.TableName;
     RegisterButton.Text     = "Create Account Mode";
     StatusLabel.Text        = "Account Editing Mode";
     BindFields(AccountsView.Rows[0]);
 }
示例#2
0
 public void LogOut()
 {
     if (!IsAdmin(CurrentUser))
     {
         SetUserStatus(CurrentUser, "Offline");
     }
     if (NotSaved)
     {
         if (MessageBoxEx.Show("Save your work or not?", "Save", MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             DatabaseSave();
         }
     }
     AccountsView.ResetDataGridView();
     SalesView.ResetDataGridView();
     ManagerNameLabel.Text = "JJETSystems";
     StatusLabel.Text      = DateTime.Now.ToLongDateString();
     AccountPanel.VisibleDock(true, RegisterPanel);
     RegisterButton.Text = "Register";
 }