Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 92302b4

Browse files
committed
Bug fixes
- Show "No results" when found 0 entries. - Show "Select customer" when purging account - Typo on editing Core account and CRM might exist.
1 parent cd382f9 commit 92302b4

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

‎Forms/AppDash.cs‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ private async Task SearchAsync(string searchText)
260260
}
261261
}
262262
}
263-
UpdateEntriesNumber();
263+
UpdateEntriesNumber(0);
264264
}
265265
else if (string.IsNullOrEmpty(searchText))
266266
{
@@ -279,7 +279,6 @@ private void FetchAll(int selectId = -1)
279279
AccountList.Items.Clear();
280280
AccountListEntry[] accounts = DatabaseManager.FetchAllEntries();
281281
List<AccountListEntry> archivedEntries = new List<AccountListEntry>();
282-
283282
foreach (var account in accounts)
284283
{
285284
if (account.isArchived == true)
@@ -387,7 +386,10 @@ private void EditCoreAccount()
387386
{
388387
CancelPuslish();
389388
selectedId = -1;
389+
SelectACustomer.Visible = true;
390+
SelectACustomer.Enabled = true;
390391
FetchAll(selectedId);
392+
391393
}
392394
if (editEntry.accEntry != null)
393395
{
@@ -420,7 +422,21 @@ private void HidePassword(object sender, EventArgs e)
420422
Password.PasswordChar = 'くろまる';
421423
}
422424

423-
private void UpdateEntriesNumber() => this.Text = AppTitle + " - Found: (" + AccountList.Items.Count.ToString() + ") accounts";
425+
private void UpdateEntriesNumber(int printEntries = -1) {
426+
int entries = 0;
427+
foreach (AccountListEntry item in AccountList.Items)
428+
{
429+
if (item.id != -1)
430+
entries++;
431+
}
432+
if(printEntries != -1)
433+
entries = printEntries;
434+
435+
if(entries > 0)
436+
this.Text = AppTitle + " - Found: (" + entries.ToString() + ") accounts";
437+
else
438+
this.Text = AppTitle + " - No accounts found";
439+
}
424440

425441
AccountEdit EditAccount;
426442
private void Edit_Click(object sender, EventArgs e)

‎Forms/CreateEntry.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private void Create_Click(object sender, EventArgs e)
9696

9797
if (DatabaseManager.SearchEntries(entry.crmNumber).Count() > 0)
9898
{
99-
var crmExist = MessageBox.Show("This CRM number exist in the databse, do you wish to continue?", Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Stop);
99+
var crmExist = MessageBox.Show("This CRM number might exist in the databse, do you wish to continue?", Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Stop);
100100
if (crmExist == DialogResult.No)
101101
return;
102102
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /