瀏覽代碼

seventh commit

Фельдбейн Артур Станиславович 3 年之前
父節點
當前提交
05655209a9

二進制
Kafe/.vs/Kafe/v17/.suo


+ 66 - 1
Kafe/Kafe/Windows/OrderWindow.xaml

@@ -7,6 +7,71 @@
         mc:Ignorable="d"
         Title="Заказы" Height="450" Width="800" WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
     <Grid>
-        
+        <ListView Name="OrderList" HorizontalContentAlignment="Stretch">
+            <ListView.ItemTemplate>
+                <DataTemplate>
+                    <Border BorderThickness="1" BorderBrush="Black">
+                        <Grid>
+                            <Grid.RowDefinitions>
+                                <RowDefinition Height="auto"/>
+                                <RowDefinition Height="auto"/>
+                                <RowDefinition Height="auto"/>
+                            </Grid.RowDefinitions>
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition/>
+                                <ColumnDefinition/>
+                                <ColumnDefinition/>
+                            </Grid.ColumnDefinitions>
+
+                            <TextBlock Text="{Binding ID, StringFormat=Заказ №{0}}"/>
+
+                            <StackPanel Orientation="Horizontal"  Grid.Column ="1">
+                                <TextBlock Text="Блюда: "/>
+                                <ItemsControl ItemsSource="{Binding OrderDIshes}">
+                                    <ItemsControl.ItemTemplate>
+                                        <DataTemplate>
+                                            <TextBlock Text="{Binding Dishes.Title}"/>
+                                        </DataTemplate>
+                                    </ItemsControl.ItemTemplate>
+                                </ItemsControl>
+                            </StackPanel>
+
+                            <TextBlock Grid.Row="0" Grid.Column="2">
+                                <TextBlock.Text>
+                                    <MultiBinding StringFormat="Столик №{0} Количество клиентов: {1}">
+                                        <Binding Path="TableNumber"/>
+                                        <Binding Path="ClientCount"/>
+                                    </MultiBinding>
+                                </TextBlock.Text>
+                            </TextBlock>
+
+                            <TextBlock Grid.Column="2" Grid.Row="2" Text="{Binding Cost, StringFormat=Стоимость заказа: {0} руб.}"/>
+
+                            <WrapPanel Orientation="Horizontal" Grid.Row="2">
+                                <TextBlock Text="Офицант: "/>
+                                <TextBlock >
+                                    <TextBlock.Text>
+                                        <MultiBinding StringFormat="{}{0} {1} {2}">
+                                            <Binding Path="Emploee.Surname"/>
+                                            <Binding Path="Emploee.Firstname"/>
+                                            <Binding Path="Emploee.Middlename"/>
+                                        </MultiBinding>
+                                    </TextBlock.Text>
+                                </TextBlock>
+
+                            </WrapPanel>
+                            <TextBlock Grid.Row="2" Grid.Column="1">
+                                <TextBlock.Text>
+                                    <MultiBinding StringFormat="Статус заказа: {0}, {1}">
+                                        <Binding Path="PayStatus.Title"/>
+                                        <Binding Path="CookStatus.Title"/>
+                                    </MultiBinding>
+                                </TextBlock.Text>
+                            </TextBlock>
+                        </Grid>
+                    </Border>
+                </DataTemplate>
+            </ListView.ItemTemplate>
+        </ListView>
     </Grid>
 </Window>

+ 6 - 0
Kafe/Kafe/Windows/OrderWindow.xaml.cs

@@ -22,6 +22,12 @@ namespace Kafe.Windows
         public OrderWindow()
         {
             InitializeComponent();
+            LoadData();
+        }
+
+        private void LoadData()
+        {
+            OrderList.ItemsSource = Helper.GetContext().Order.ToList();
         }
     }
 }

+ 24 - 16
Kafe/Kafe/obj/Debug/Windows/OrderWindow.g.i.cs

@@ -1,4 +1,5 @@
-#pragma checksum "..\..\..\Windows\OrderWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F98B79AAE04AFA8AFC41F861143CBFC9D62127301063336080F51AF21788EA7E"
+// Updated by XamlIntelliSenseFileGenerator 09.04.2022 17:01:11
+#pragma checksum "..\..\..\Windows\OrderWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F98B79AAE04AFA8AFC41F861143CBFC9D62127301063336080F51AF21788EA7E"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -32,44 +33,51 @@ using System.Windows.Shapes;
 using System.Windows.Shell;
 
 
-namespace Kafe.Windows {
-    
-    
+namespace Kafe.Windows
+{
+
+
     /// <summary>
     /// OrderWindow
     /// </summary>
-    public partial class OrderWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
-        
+    public partial class OrderWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector
+    {
+
         private bool _contentLoaded;
-        
+
         /// <summary>
         /// InitializeComponent
         /// </summary>
         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
-        public void InitializeComponent() {
-            if (_contentLoaded) {
+        public void InitializeComponent()
+        {
+            if (_contentLoaded)
+            {
                 return;
             }
             _contentLoaded = true;
             System.Uri resourceLocater = new System.Uri("/Kafe;component/windows/orderwindow.xaml", System.UriKind.Relative);
-            
-            #line 1 "..\..\..\Windows\OrderWindow.xaml"
+
+#line 1 "..\..\..\Windows\OrderWindow.xaml"
             System.Windows.Application.LoadComponent(this, resourceLocater);
-            
-            #line default
-            #line hidden
+
+#line default
+#line hidden
         }
-        
+
         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
         [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
-        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
+        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
+        {
             this._contentLoaded = true;
         }
+
+        internal System.Windows.Controls.ListView OrderList;
     }
 }