Пример #1
0
        private void FillTable(DatabaseClasses.PackingList packinglist)
        {
            try
            {
                foreach (var property in packinglist.GetType().GetProperties())
                {
                    TextCell tc = new TextCell()
                    {
                        TextColor = Color.WhiteSmoke, DetailColor = Color.Peru,
                    };
                    var id  = property.Name;
                    var val = property.GetValue(packinglist);

                    tc.Text   = id;
                    tc.Detail = val.ToString();
                    Section.Add(tc);
                }
                HeaderLabel.Text = "Packing Number: " + packinglist.PackingNo;
                Content          = StackLayout;
            }
            catch (Exception ex)
            {
                HeaderLabel.Text = ex.ToString();
            }
        }
Пример #2
0
        private void ListView_OnItemTapped(object sender, ItemTappedEventArgs e)
        {
            try
            {
                string[] esplit = e.Item.ToString().Split(':');
                DatabaseClasses.PackingList item = _otherlist.FirstOrDefault(i => i.PackingNo.ToString() == esplit[0]);
                if (item == null)
                {
                    EditorWarning.Text = "Packinglist could not be found.";
                    return;
                }

                Navigation.PushModalAsync(new DisplayItemPage(item));
            }
            catch (Exception ex)
            {
                EditorWarning.Text = ex.ToString();
            }
        }
Пример #3
0
        public DisplayItemPage(DatabaseClasses.PackingList packinglist)
        {
            InitializeComponent();

            FillTable(packinglist);
        }