Esempio n. 1
0
 public void SetDishez(CustomerCheck Chk)
 {
     if (Chk != null)
     {
         ctrlOrder.SetDishez(Chk);
     }
 }
        public void SetDishez(CustomerCheck Chk)
        {
            CheckPanel.Children.Clear();
            foreach (CustomerDish D in Chk.Dishes)
            {
                DockPanel Dp = new DockPanel();
                Dp.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
                Dp.Margin = new Thickness(0, -5, 0, 0);

                Label lbName = new Label();

                lbName.Content = D.Name.Replace(Environment.NewLine, " ").Replace("  ", " ");


                lbName.FontSize   = 18;
                lbName.FontFamily = new FontFamily("Museo Cyrl 500");

                Label lbPrice = new Label();
                lbPrice.Content    = D.Price.ToString("0.00");
                lbPrice.FontSize   = 18;
                lbPrice.FontFamily = new FontFamily("Museo Cyrl 500");
                lbPrice.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Right;

                DockPanel.SetDock(lbName, Dock.Left);
                DockPanel.SetDock(lbPrice, Dock.Right);

                Dp.Children.Add(lbName);
                Dp.Children.Add(lbPrice);

                CheckPanel.Children.Add(Dp);
            }
            SumLabel.Content = ((decimal)Chk.Ammount / (decimal)100).ToString("0.00р");
        }
Esempio n. 3
0
 public static void SetCheck(CustomerCheck Chk)
 {
     Mfrm.SetDishez(Chk);
     Mfrm.ShowPaiment(true);
 }