RecTrans.xaml 13 KB

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