public override string start()
        {
            c = account.getCourse();
            nextYear = c.getNextStageID();

            //  Display new stage details and ask for optional
            StageDetailsScreen screen = new StageDetailsScreen(c);

            //  Pick Optional
            if (screen.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                //  Set both mandatory and chosen optional subjects
                this.subjects = screen.getSelectedSubjects();

                //  Calculate fees, ask for payment and pay

                PaymentScreen studentFees = new PaymentScreen(subjects);
                if(studentFees.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    StagePayment p = new StagePayment();
                    p.setAmount(studentFees.getTotalCost());

                    registerStage(p);
                    return "ok";
                }
            }
            return null;
        }
        private void ödemeEkranıToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PaymentScreen ChildForm = new PaymentScreen();

            ChildForm.MdiParent = this;
            ChildForm.Show();
        }
        public override string start()
        {
            c        = account.getCourse();
            nextYear = c.getNextStageID();

            //  Display new stage details and ask for optional
            StageDetailsScreen screen = new StageDetailsScreen(c);

            //  Pick Optional
            if (screen.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                //  Set both mandatory and chosen optional subjects
                this.subjects = screen.getSelectedSubjects();

                //  Calculate fees, ask for payment and pay


                PaymentScreen studentFees = new PaymentScreen(subjects);
                if (studentFees.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    StagePayment p = new StagePayment();
                    p.setAmount(studentFees.getTotalCost());

                    registerStage(p);
                    return("ok");
                }
            }
            return(null);
        }
        public void LoadOrder(PaymentScreen ps)
        {
            double queueTotal = 0;

            foreach (KeyValuePair <MenuItem, int> order in currentOrder)
            {
                //set name, quantity and price of drinks in order queue
                //order.Key.name is the name of the item
                //orderTray[order.Key] is price per item

                string name          = order.Key.name;
                int    item_quantity = order.Value;
                double price         = order.Key.price * order.Value;
                queueTotal += order.Key.price * order.Value;

                paymentItem curItem = new paymentItem(order, name, item_quantity, price);
                curItem.Width              = 600;
                curItem.Margin             = new System.Windows.Thickness(0);
                curItem.item_name.FontSize = 18;

                ps.sp_order.Children.Add(curItem);

                //update order queue total
            }
            ps.subVal.Content   = "$" + queueTotal.ToString("F");
            ps.gstVal.Content   = "$" + (queueTotal * .05).ToString("F");
            ps.totalVal.Content = "$" + (queueTotal * 1.05).ToString("F");
        }
Пример #5
0
        private void btn_payNow_click(object sender, RoutedEventArgs e)
        {
            GrayedOutWindow gw = new GrayedOutWindow();
            PaymentScreen   ps = new PaymentScreen();

            gw.Show();
            ps.ShowDialog();
            gw.Close();
        }