示例#1
0
        void addCredential()
        {
            frm_EditCredential newCredentialForm = new frm_EditCredential();

            newCredentialForm.ShowDialog();
            credentials.Add(newCredentialForm.credential);
            dgAccountList.Rows.Clear();
            credentials.fillInDataGrid(dgAccountList);
            clearFields();
        }
示例#2
0
        void editCredentialAtIndex(int i)
        {
            frm_EditCredential editCredentialForm = new frm_EditCredential(credentials.getCredentialAtIndex(i)); // Assumes that dgAccountList and Credentials list are identical

            editCredentialForm.ShowDialog();                                                                     // get window and its thing
            credentials.editCredentialAtIndex(editCredentialForm.credential, i);                                 // Set changes in the local DB
            // Code above is probably redundant with addCredential(int i)
            dgAccountList.Rows.Clear();
            credentials.fillInDataGrid(dgAccountList);

            clearFields();
        }