public void populateList(string result) { Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); Dictionary <string, SecurityButton> dictionary2 = new Dictionary <string, SecurityButton>(); if (dictionary.Count > 0) { for (int i = 0; i < dictionary["Name"].Count; i++) { if (!dictionary2.ContainsKey(dictionary["IDKey"][i])) { string text = FormatFunctions.PrettyDate(dictionary["Name"][i]) + " ," + FormatFunctions.PrettyDate(dictionary["Value"][i]); SecurityButton dataButton = new SecurityButton(int.Parse(dictionary["IDKey"][i]), new string[] { "Employee" }) { Content = text, Width = ClientData.sideFrame.Width * 0.925 }; dataButton.Click += this.onClicked; dataButton.Integer2 = int.Parse(dictionary["Stage"][i]); List <UIElement> list = new List <UIElement>() { dataButton }; bool[] box = new bool[] { false }; GridFiller.rapidFillPremadeObjectsStandardHeight(list, dataGrid, box, 25); dictionary2.Add(dictionary["IDKey"][i], dataButton); } else { SecurityButton dataButton2 = dictionary2[dictionary["IDKey"][i]]; dataButton2.Content = dataButton2.Content + " ," + dictionary["Value"][i]; } } } }
public void populatePage(string result) { Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); entryDict = new List <DataPair>(); if (dictionary.Count > 0) { nameLabel.Text = dictionary["Name"][0]; for (int i = 0; i < dictionary["Index"].Count; i++) { if (dictionary["Index"][i].Contains("ook") && dictionary["Value"][i] != "") { datePicker.Date = DateTime.Parse(FormatFunctions.PrettyDate(dictionary["Value"][i])); } else if (dictionary["Index"][i].Contains("otes")) { noteLabel.Text += dictionary["Value"][i]; } else if (dictionary["Index"][i].Contains("dress")) { address = dictionary["Value"][i]; addressLabel.Text = dictionary["Value"][i]; } else { DataPair dataPair = new DataPair(int.Parse(dictionary["FID"][i]), dictionary["Value"][i], dictionary["Index"][i]); dataPair.Value.Text = dictionary["Value"][i]; dataPair.Value.Placeholder = "Value here"; dataPair.Index.Text = dictionary["Index"][i]; dataPair.Index.Placeholder = "Index here"; List <View> list = new List <View>() { dataPair.Index, dataPair.Value }; GridFiller.rapidFillPremadeObjectsStandardHeight(list, bodyGrid, new bool[] { true, true }, 50); entryDict.Add(dataPair); if (dictionary["Index"][i].Contains("hone")) { phoneLabel.Text = dictionary["Value"][i]; } } } } FileList fl = new FileList(customer); GridHolder.Children.Add(fl); }
public void populatePend(string result) { GridFiller.PurgeHeader(ApproveBody); Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); if (dictionary.Count > 0) { for (int i = 0; i < dictionary["IDKey"].Count; i++) { DataButton b = new DataButton(); b.Text = "Approve"; b.Integer = int.Parse(dictionary["IDKey"][i]); b.Integer2 = int.Parse(dictionary["Approved"][i]); if (dictionary["Approved"][i] == "1") { b.BackgroundColor = ClientData.rotatingConfirmationColors[0]; b.Text = "Disapprove"; } else { b.BackgroundColor = ClientData.rotatingNegativeColors[0]; } b.Clicked += onClickApprove; DataButton b2 = new DataButton(); b2.Text = "Add Note"; b2.Integer = int.Parse(dictionary["IDKey"][i]); b2.Clicked += onClickANote; Label T = new Label(); T.Text = FormatFunctions.PrettyDate(dictionary["TimeStamp"][i]); Label L = new Label(); L.Text = FormatFunctions.PrettyDate(dictionary["Coordinates"][i]); Label I = new Label(); I.Text = convertState(dictionary["State"][i]); Label N = new Label(); N.Text = FormatFunctions.PrettyDate(dictionary["Note"][i]); List <View> list = new List <View>() { b, b2, T, L, I, N }; GridFiller.rapidFillPremadeObjectsStandardHeight(list, ApproveBody, new bool[] { false, false, true, true, true, true }, 50); } } }
public void populateList(string result) { Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); Dictionary <string, SecurityButton> dictionary2 = new Dictionary <string, SecurityButton>(); if (dictionary.Count > 0) { for (int i = 0; i < dictionary["Name"].Count; i++) { if (!dictionary2.ContainsKey(dictionary["IDKey"][i])) { string text = dictionary["Name"][i] + " ," + dictionary["Value"][i]; SecurityButton dataButton = new SecurityButton(int.Parse(dictionary["IDKey"][i]), new string[] { "Employee" }) { Text = text, FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)), VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; dataButton.Clicked += this.onClicked; dataButton.Integer2 = int.Parse(dictionary["Stage"][i]); List <View> list = new List <View>() { dataButton }; bool[] box = new bool[] { false }; GridFiller.rapidFillPremadeObjectsStandardHeight(list, dataGrid, box, 50); dictionary2.Add(dictionary["IDKey"][i], dataButton); } else { SecurityButton dataButton2 = dictionary2[dictionary["IDKey"][i]]; dataButton2.Text = dataButton2.Text + " ," + dictionary["Value"][i]; } } } }