RecTrans.xaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <timesheets:BasePage xmlns:timesheets="clr-namespace:comal.timesheets" xmlns="http://xamarin.com/schemas/2014/forms"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. x:Class="comal.timesheets.RecTrans"
  5. xmlns:material="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material" xmlns:extensions="http://xamarin.com/schemas/2020/toolkit"
  6. material:MaterialNavigationPage.AppBarColor="#a2006d"
  7. Title="Transfer Stock"
  8. >
  9. <timesheets:BasePage.ActionButtons>
  10. <ImageButton x:Name="Save" Clicked="SaveBatch_Clicked" Source="floppydisk.png"/>
  11. </timesheets:BasePage.ActionButtons>
  12. <timesheets:BasePage.PageContent>
  13. <Grid Padding="2">
  14. <Grid.ColumnDefinitions>
  15. <ColumnDefinition Width="*"/>
  16. <ColumnDefinition Width="*"/>
  17. </Grid.ColumnDefinitions>
  18. <!--Left Column-->
  19. <Grid Grid.Column="0">
  20. <Grid.RowDefinitions>
  21. <RowDefinition Height="auto"/>
  22. <RowDefinition Height="auto"/>
  23. </Grid.RowDefinitions>
  24. <!--Top Left Issuing-->
  25. <Frame x:Name="issuingFrame"
  26. Grid.Row="0" Padding="0" BackgroundColor="WhiteSmoke" BorderColor="Black" CornerRadius="10">
  27. <Grid Padding="0">
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="40"/>
  30. <RowDefinition Height="60"/>
  31. <RowDefinition Height="40"/>
  32. </Grid.RowDefinitions>
  33. <!--Top row of frame-->
  34. <Label x:Name="issuingLocationLbl" Text="Issuing Location" VerticalOptions="Center" FontSize="Medium" TextColor="#008b8b"
  35. Grid.Row="0" Margin="2" FontAttributes="Bold" HorizontalOptions="Center"/>
  36. <!--Bottom row of frame-->
  37. <Label Grid.Row="2" Margin="2"
  38. x:Name="issuingLocationCountLbl" Text="Items: " HorizontalOptions="Center" VerticalOptions="Start"/>
  39. </Grid>
  40. </Frame>
  41. <extensions:Expander Grid.Row="0" x:Name="issuingExpander" VerticalOptions="Center" HorizontalOptions="FillAndExpand"
  42. extensions:CornerRadiusEffect.CornerRadius="10" Tapped="IssuingExpander_Tapped"
  43. BackgroundColor="#FFF5F5F5" Margin="3">
  44. <extensions:Expander.Header>
  45. <Frame CornerRadius="10" BackgroundColor="#15C7C1" BorderColor="Transparent" HorizontalOptions="Center">
  46. <Label Text="Choose" TextColor="White" BackgroundColor="Transparent">
  47. </Label>
  48. </Frame>
  49. </extensions:Expander.Header>
  50. <StackLayout>
  51. <Button Margin="2, 6, 2, 2" TextColor="White" BackgroundColor="#15C7C1" CornerRadius="10"
  52. Text="Search" FontAttributes="Bold" HorizontalOptions="Center" VerticalOptions="Center" Padding="6,3,6,3"
  53. Clicked="ChooseIssuingLocationBtn_Clicked" x:Name="chooseIssuingLocationBtn"/>
  54. <Button Margin="2" TextColor="White" BackgroundColor="#15C7C1" CornerRadius="10" Clicked="IssuingFavourite_Clicked"
  55. Text="Favourite 1" FontAttributes="Bold" HorizontalOptions="Center" VerticalOptions="Center" Padding="6,3,6,3"
  56. x:Name="issuingFavouriteBtn1"
  57. />
  58. <Button Margin="2" TextColor="White" BackgroundColor="#15C7C1" CornerRadius="10" Clicked="IssuingFavourite_Clicked"
  59. Text="Favourite 2" FontAttributes="Bold" HorizontalOptions="Center" VerticalOptions="Center" Padding="6,3,6,3"
  60. x:Name="issuingFavouriteBtn2"
  61. />
  62. <Button Margin="2" TextColor="White" BackgroundColor="#15C7C1" CornerRadius="10" Clicked="IssuingFavourite_Clicked"
  63. Text="Favourite 3" FontAttributes="Bold" HorizontalOptions="Center" VerticalOptions="Center" Padding="6,3,6,3"
  64. x:Name="issuingFavouriteBtn3"
  65. />
  66. </StackLayout>
  67. </extensions:Expander>
  68. <!--Left List-->
  69. <Frame Grid.Row="1" Padding="0" BackgroundColor="WhiteSmoke">
  70. <StackLayout>
  71. <Entry x:Name="searchEnt" Placeholder="Search" HorizontalTextAlignment="Center" TextChanged="SearchEnt_Changed"/>
  72. <ListView x:Name="issuingListView" HasUnevenRows="True">
  73. <ListView.ItemTemplate>
  74. <DataTemplate>
  75. <ViewCell Tapped="IssuingListView_Tapped">
  76. <Frame BorderColor="#15C7C1" Margin="2" CornerRadius="15" Padding="5" HasShadow="False">
  77. <Grid>
  78. <Grid.RowDefinitions>
  79. <RowDefinition Height="auto"/>
  80. <RowDefinition Height="auto"/>
  81. <RowDefinition Height="auto"/>
  82. <RowDefinition Height="auto"/>
  83. <RowDefinition Height="auto"/>
  84. <RowDefinition Height="auto"/>
  85. <RowDefinition Height="{Binding LastRowHeight}"/>
  86. </Grid.RowDefinitions>
  87. <Label Grid.Row="0" Text="{Binding Code}" FontAttributes="Bold" HorizontalOptions="Center"/>
  88. <Label Grid.Row="1" Text="{Binding Name}"/>
  89. <Label Grid.Row="2" Text="{Binding DisplayJob}"/>
  90. <Label Grid.Row="3" Text="{Binding DisplayFinish}"/>
  91. <Label Grid.Row="4" Text="{Binding DisplaySize}"/>
  92. <Label Grid.Row="5" Text="{Binding DisplayUnits}"/>
  93. <Image Grid.Row="6" IsVisible="{Binding ImageVisible}" Source="{Binding ImageSource}"/>
  94. </Grid>
  95. </Frame>
  96. </ViewCell>
  97. </DataTemplate>
  98. </ListView.ItemTemplate>
  99. </ListView>
  100. </StackLayout>
  101. </Frame>
  102. </Grid>
  103. <!--Right Column-->
  104. <Grid Grid.Column="1">
  105. <Grid.RowDefinitions>
  106. <RowDefinition Height="auto"/>
  107. <RowDefinition Height="auto"/>
  108. </Grid.RowDefinitions>
  109. <!--Top Right Receiving-->
  110. <Frame Grid.Row="0" x:Name="receivingFrame"
  111. Padding="0" BackgroundColor="WhiteSmoke" BorderColor="Black" CornerRadius="10">
  112. <Grid Padding="0">
  113. <Grid.RowDefinitions>
  114. <RowDefinition Height="40"/>
  115. <RowDefinition Height="60"/>
  116. <RowDefinition Height="40"/>
  117. </Grid.RowDefinitions>
  118. <!--Top row of frame-->
  119. <Label x:Name="receivingLocationLbl" Text="Receiving Location" VerticalOptions="Center" FontSize="Medium" TextColor="PaleVioletRed"
  120. Grid.Row="0" Margin="2" FontAttributes="Bold" HorizontalOptions="Center"/>
  121. <!--Bottom row of frame-->
  122. <Label Grid.Row="2" Margin="2"
  123. x:Name="receivingCountLbl" Text="Items in batch: " HorizontalOptions="Center" VerticalOptions="Start"/>
  124. </Grid>
  125. </Frame>
  126. <extensions:Expander Grid.Row="0" x:Name="receivingExpander" VerticalOptions="Center" HorizontalOptions="FillAndExpand"
  127. extensions:CornerRadiusEffect.CornerRadius="10" Tapped="ReceivingExpander_Tapped"
  128. BackgroundColor="#FFF5F5F5" Margin="3">
  129. <extensions:Expander.Header>
  130. <Frame CornerRadius="10" BackgroundColor="#9f4576" BorderColor="Transparent" HorizontalOptions="Center">
  131. <Label Text="Choose" TextColor="White" BackgroundColor="Transparent">
  132. </Label>
  133. </Frame>
  134. </extensions:Expander.Header>
  135. <StackLayout>
  136. <Button Margin="2, 6, 2, 2" TextColor="White" BackgroundColor="#9f4576" CornerRadius="10"
  137. Text="New / Search" FontAttributes="Bold" HorizontalOptions="Center" VerticalOptions="Center" Padding="6,3,6,3"
  138. x:Name="chooseReceivingLocationBtn" Clicked="ChooseReceivingLocationBtn_Clicked"/>
  139. <Button Margin="2" TextColor="White" BackgroundColor="#9f4576" CornerRadius="10" x:Name="chooseJobBtn"
  140. Text="Job" FontAttributes="Bold" HorizontalOptions="Center" VerticalOptions="Center" Padding="6,3,6,3" Clicked="JobBtn_Clicked"
  141. />
  142. <Button Margin="2" TextColor="White" BackgroundColor="#9f4576" CornerRadius="10" x:Name="receivingFavouriteBtn1"
  143. Text="Favourite 1" FontAttributes="Bold" HorizontalOptions="Center" VerticalOptions="Center" Padding="6,3,6,3" Clicked="ReceivingFavourite_Clicked"
  144. />
  145. <Button Margin="2" TextColor="White" BackgroundColor="#9f4576" CornerRadius="10" x:Name="receivingFavouriteBtn2"
  146. Text="Favourite 2" FontAttributes="Bold" HorizontalOptions="Center" VerticalOptions="Center" Padding="6,3,6,3" Clicked="ReceivingFavourite_Clicked"
  147. />
  148. <Button Margin="2" TextColor="White" BackgroundColor="#9f4576" CornerRadius="10" x:Name="receivingFavouriteBtn3"
  149. Text="Favourite 3" FontAttributes="Bold" HorizontalOptions="Center" VerticalOptions="Center" Padding="6,3,6,3" Clicked="ReceivingFavourite_Clicked"
  150. />
  151. </StackLayout>
  152. </extensions:Expander>
  153. <!--Right List-->
  154. <Frame Grid.Row="1" Padding="0" BackgroundColor="WhiteSmoke">
  155. <ListView x:Name="receivingListView" HasUnevenRows="True">
  156. <ListView.ItemTemplate>
  157. <DataTemplate>
  158. <ViewCell Tapped="ReceivingListView_Tapped">
  159. <Frame BorderColor="#c71585" Margin="2" CornerRadius="15" Padding="5" HasShadow="False">
  160. <Grid>
  161. <Grid.RowDefinitions>
  162. <RowDefinition Height="auto"/>
  163. <RowDefinition Height="auto"/>
  164. <RowDefinition Height="auto"/>
  165. <RowDefinition Height="auto"/>
  166. <RowDefinition Height="auto"/>
  167. <RowDefinition Height="auto"/>
  168. <RowDefinition Height="{Binding LastRowHeight}"/>
  169. </Grid.RowDefinitions>
  170. <Label Grid.Row="0" Text="{Binding Code}" FontAttributes="Bold" HorizontalOptions="Center"/>
  171. <Label Grid.Row="1" Text="{Binding Name}"/>
  172. <Label Grid.Row="2" Text="{Binding DisplayJob}"/>
  173. <Label Grid.Row="3" Text="{Binding DisplayFinish}"/>
  174. <Label Grid.Row="4" Text="{Binding DisplaySize}"/>
  175. <Label Grid.Row="5" Text="{Binding DisplayUnits}"/>
  176. <Image Grid.Row="6" IsVisible="{Binding ImageVisible}" Source="{Binding ImageSource}"/>
  177. </Grid>
  178. </Frame>
  179. </ViewCell>
  180. </DataTemplate>
  181. </ListView.ItemTemplate>
  182. </ListView>
  183. </Frame>
  184. </Grid>
  185. </Grid>
  186. </timesheets:BasePage.PageContent>
  187. </timesheets:BasePage>