public EmailSetupPage() { InitializeComponent(); layoutControl = layoutItems; if (editrow == null) { editrow = new CompanySettingsClient(); } layoutItems.DataContext = editrow; BusyIndicator = busyIndicator; ribbonControl = frmRibbon; frmRibbon.OnItemClicked += frmRibbon_OnItemClicked; this.Loaded += EmailSetupPage_Loaded; BindPage(); }
async void BindPage() { busyIndicator.IsBusy = true; var list = await api.Query <CompanySettingsClient>(); if (list != null && list.Length > 0) { editrow = list[0]; bindEmailBody(); layoutItems.DataContext = editrow; } else { IsNew = true; } ClearBusy(); }
private async System.Threading.Tasks.Task BindApprover() { leApproverSetup.ItemsSource = smtps; cSetting = new CompanySettingsClient(); var err = await api.Read(cSetting); if (err != ErrorCodes.Succes) { OKButton.IsEnabled = false; } var approveSmtp = cSetting.ApproveSMTP; if (!string.IsNullOrEmpty(approveSmtp)) { var smtp = smtps.Where(s => s.Number == approveSmtp).FirstOrDefault(); leApproverSetup.SelectedItem = smtp; } }