| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Xamarin.Forms;
- using Xamarin.Forms.Xaml;
- namespace comal.timesheets
- {
- [XamlCompilation(XamlCompilationOptions.Compile)]
- public partial class StockLocationViewCell : ContentView
- {
- public StockLocationShell stockLocationShell;
- public StockLocationViewCell (StockLocationShell _shell)
- {
- InitializeComponent ();
- stockLocationShell = _shell;
- BindingContext = stockLocationShell;
- poItemStackLayout.Children.Clear();
- foreach (POItemShell poitem in stockLocationShell.PoItems)
- {
- Grid grid = new Grid() { Margin = 1, Padding = 1};
- grid.RowDefinitions.Add(new RowDefinition {Height = new GridLength(1, GridUnitType.Auto)});
- grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Auto) });
- Label label = new Label() { Text = poitem.Description, Margin = 0, FontAttributes = FontAttributes.Bold};
- grid.Children.Add(label);
- Label label1 = new Label() { Text = "Qty: " + poitem.ReceivedQty.ToString(), Margin = 0, HorizontalOptions = LayoutOptions.Center
- , HorizontalTextAlignment = TextAlignment.Center};
- grid.Children.Add(label1);
- Grid.SetRow(label, 0);
- Grid.SetRow(label1, 1);
- Frame frame = new Frame() { BorderColor = Color.FromHex("#c71585"), Margin = 1 , Padding = 3, CornerRadius = 10};
- frame.Content = grid;
- poItemStackLayout.Children.Add(frame);
- }
- }
- }
- }
|