Exemple #1
0
        public void SetDishez(FCCCheck Chk)
        {
            CheckPanel.Children.Clear();
            foreach (FCCDish 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 = 20;

                Label lbPrice = new Label();
                lbPrice.Content  = ((decimal)D.Price / (decimal)100).ToString("0.00");
                lbPrice.FontSize = 20;
                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р");
        }
        public static bool StartChangeMoney(FCCCheck Chk, out string Status)
        {
            CFCCApi FCCApi = new CFCCApi();

            Status = FCCApi.GetStatusStringRus(LastCI10StatusChange);
            if (LastCI10StatusChange != 1)
            {
                return(false);
            }

            CurentOrderfrm.RenameCancelBtn("Отменить оплату");
            CheckNeedCanceled = false;
            CheckCanceled     = false;

            //string StatusStr = "";
            //int StatusId = FCCApi.GetStatus(out StatusStr);
            //Status = StatusStr;

            CurentOrderfrm.SetCancelButtonEnabled(true);

            /*
             * if ((StatusId != 1) && (StatusId != 18) && (StatusId != 3) && (StatusId != 4))
             * {
             *  return false;
             * }
             */
            CurrentCheck = Chk;



            Total = Chk.RoundedAmount;
            Utils.ToMoneyCountLog(MoneyChangeCommands.StartPayment, (int)Total, 0, 0, 0, CurrentCheck.AlohNumber);
            ChangeProcess      = true;
            FixedDepositRaised = false;
            FCCApi.StartChangeAsync((int)(Total));

            if (IsSync)
            {
                ShowCassirFrm();
            }
            return(true);
        }