Example #1
0
            public void Bind(Models.DTO.Order.Get.OrderModel model)
            {
                CellContentRootView?.SetBackgroundColor(ColorConstants.BackroundCell, 5);

                if (!ItemTypeOrder.IsNull())
                {
                    ItemTypeOrder.Text = model.Type == 1 ? @ROrderBar.OrderAtBar : ROrderTable.OrderAtTable;
                    ItemTypeOrder?.SetTextColor(ColorConstants.WhiteColor);
                    ItemTypeOrder.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size14);
                }

                if (!PriceText.IsNull())
                {
                    PriceText.Text = "€" + model.TotalAmount;
                    PriceText?.SetTextColor(ColorConstants.SelectorHome);
                    PriceText?.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size14);
                }

                if (!OrderIdText.IsNull())
                {
                    OrderIdText.Text = "#" + model.Id;
                    OrderIdText?.SetTextColor(ColorConstants.SelectorHome);
                    OrderIdText?.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size36);
                }

                if (DateTimeText.IsNull())
                {
                    return;
                }
                DateTimeText.Text = model.UpdatedAt.UnixTimeStampToDateTime().ToString("dd.MM.yyyy / hh:mm");
                DateTimeText?.SetTextColor(ColorConstants.WhiteColor);
                DateTimeText?.SetFont(FontsConstant.OpenSansRegular, FontsConstant.Size14);


                if (CellContentRootView.IsNull())
                {
                    return;
                }
                CellContentRootView.Tag    = model;
                CellContentRootView.Click -= CellContentRootView_Click;
                CellContentRootView.Click += CellContentRootView_Click;
            }