ControlUtils: Cleanup SelectItem() method and use accordingly
This commit is contained in:
@ -42,7 +42,7 @@ namespace Elwig.Windows {
|
||||
.Where(v => v.Year == Year)
|
||||
.OrderBy(v => v.AvNr)
|
||||
.Include(v => v.Season.Currency)
|
||||
.ToListAsync(), v => (v as PaymentVar)?.AvNr);
|
||||
.ToListAsync());
|
||||
await Update();
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ namespace Elwig.Windows {
|
||||
await ctx.SaveChangesAsync();
|
||||
await App.HintContextChange();
|
||||
|
||||
ControlUtils.SelectListBoxItem(PaymentVariantList, v, v => (v as PaymentVar)?.AvNr);
|
||||
ControlUtils.SelectItem(PaymentVariantList, v);
|
||||
} catch (Exception exc) {
|
||||
var str = "Der Eintrag konnte nicht in der Datenbank aktualisiert werden!\n\n" + exc.Message;
|
||||
if (exc.InnerException != null) str += "\n\n" + exc.InnerException.Message;
|
||||
@ -232,7 +232,7 @@ namespace Elwig.Windows {
|
||||
await ctx.SaveChangesAsync();
|
||||
await App.HintContextChange();
|
||||
|
||||
ControlUtils.SelectListBoxItem(PaymentVariantList, n, v => (v as PaymentVar)?.AvNr);
|
||||
ControlUtils.SelectItem(PaymentVariantList, n);
|
||||
} catch (Exception exc) {
|
||||
var str = "Der Eintrag konnte nicht in der Datenbank aktualisiert werden!\n\n" + exc.Message;
|
||||
if (exc.InnerException != null) str += "\n\n" + exc.InnerException.Message;
|
||||
|
Reference in New Issue
Block a user