private void AvailableAuths_SelectedIndexChanged(object sender, EventArgs e) { TheSelectedAuth = (AuthServiceForDisplay)AvailableAuths.SelectedItem; GetService(TheSelectedAuth.TheAuth.COSTCENTER); dtpSD.Date = DateTime.Now; dtpSD.MinimumDate = DateTime.Now; dtpSD.MaximumDate = TheSelectedAuth.TheAuth.ENDDATE; AvailableDSPs.Items.Add(Settings.USERNAME); AvailableDSPs.SelectedIndex = 0; //dtpED.MinimumDate = DateTime.Now; //dtpED.MaximumDate = TheSelectedAuth.TheAuth.ENDDATE; //lblUnits.Text = "Units (" + TheSelectedAuth.TheAuth.REMAININGUNITS.ToString() + " max)"; }
async void GetAuths() { string URL = Settings.BASEURL;//""; string u = SelectedMember.TheData.SSN; //ActWorking.IsVisible = true; //ActWorking.IsRunning = true; URL += "/Login/GetAuthsForNow"; HttpClient c = new HttpClient(); c.DefaultRequestHeaders.Add("LOGIN", Settings.USERNAME); c.DefaultRequestHeaders.Add("IDNUM", u); var response = await c.GetStringAsync(URL); var theresult = JsonConvert.DeserializeObject <List <AuthorizedService> >(response); var TheList = new List <AuthServiceForDisplay>(); foreach (AuthorizedService s in theresult) { AuthServiceForDisplay sd = new AuthServiceForDisplay(s); TheList.Add(sd); } AvailableAuths.ItemsSource = TheList; //ActWorking.IsVisible = false; //ActWorking.IsRunning = false; //lvMYCASELOAD.ItemsSource = theresult; }