Esempio n. 1
0
 private void btnLeft_Click(object sender, EventArgs e)
 {
     try
     {
         foreach (Control ctr in flpOldTable.Controls)
         {
             if (ctr is UCOrder)
             {
                 UCOrder ucOrder = (UCOrder)ctr;
                 if (ucOrder.BackColor == Color.FromArgb(0, 102, 204))
                 {
                     OrderDetailModel itemOrder = (OrderDetailModel)ucOrder.Tag;
                     OrderSlpitNew.FloorID = lblNewTable.Text;
                     OrderSlpitNew.ShiftID = OrderMain.ShiftID;
                     OrderSlpitNew.addItemToList(itemOrder);
                     OrderMain.ListOrderDetail.Remove(itemOrder);
                     OrderSlpitNew.SubTotal();
                     OrderMain.SubTotal();
                     OrderMain.isTransferTableAll = 0;
                     RefeshOrderMain(OrderMain, flpOldTable);
                     RefeshOrderMain(OrderSlpitNew, flpNewTable);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         LogPOS.WriteLog("frmTransferTable::::::::::::::::::btnLeft_Click::::::::::::::::::::" + ex.Message);
     }
 }
Esempio n. 2
0
        private void frmPayMent_Load(object sender, EventArgs e)
        {
            //var screen = Screen.FromPoint(this.Location);
            //this.Width = screen.WorkingArea.Width;
            //this.Height = screen.WorkingArea.Height-50;
            ////this.Location = new Point(screen.WorkingArea.Right - this.Width, screen.WorkingArea.Bottom - this.Height);
            //this.Location = new Point(screen.WorkingArea.Right - this.Width, screen.WorkingArea.Bottom - this.Height);
            //WinAPI.AnimateWindow(this.Handle, animationTime, flags);

            lblTotalDue.Text    = "$" + money.Format2(Convert.ToDouble(OrderMain.SubTotal()));
            txtBalance.Text     = "$" + money.Format2(Convert.ToDouble(OrderMain.SubTotal()));
            txtBalancetemp.Text = OrderMain.SubTotal().ToString();
        }
Esempio n. 3
0
        private void PrintReceipt(PrintPageEventArgs e)
        {
            float l_y = 0;

            l_y  = posPrinter.DrawString(cofig.Name, e, new Font("Arial", 10, FontStyle.Bold), l_y, 2);
            l_y  = posPrinter.DrawString(cofig.ABN, e, new Font("Arial", 10, FontStyle.Bold), l_y, 2);
            l_y  = posPrinter.DrawString(cofig.Address, e, new Font("Arial", 10, FontStyle.Italic), l_y, 2);
            l_y  = posPrinter.DrawString(cofig.Tel, e, new Font("Arial", 10, FontStyle.Italic), l_y, 2);
            l_y += posPrinter.GetHeightPrinterLine() / 10;
            l_y  = posPrinter.DrawLine("", new Font("Arial", 14), e, System.Drawing.Drawing2D.DashStyle.Dot, l_y, 1);
            l_y  = posPrinter.DrawString(DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString(), e, new Font("Arial", 10, FontStyle.Italic), l_y, 1);
            l_y  = posPrinter.DrawString("Tranx #", e, new Font("Arial", 10, FontStyle.Italic), l_y, 1);
            l_y  = posPrinter.DrawString("Table# " + OrderMain.FloorID, e, new Font("Arial", 10, FontStyle.Italic), l_y, 1);
            l_y  = posPrinter.DrawString("OPERATOR#MANAGER", e, new Font("Arial", 10, FontStyle.Italic), l_y, 1);
            posPrinter.DrawLine("", new Font("Arial", 14), e, System.Drawing.Drawing2D.DashStyle.Dot, l_y, 1);
            l_y += posPrinter.GetHeightPrinterLine() / 10;
            l_y  = posPrinter.DrawString("BILL", e, new Font("Arial", 10, FontStyle.Bold), l_y, 2);
            l_y += posPrinter.GetHeightPrinterLine() / 10;
            posPrinter.DrawLine("", new Font("Arial", 14), e, System.Drawing.Drawing2D.DashStyle.Dot, l_y, 1);
            l_y += posPrinter.GetHeightPrinterLine() / 10;
            for (int i = 0; i < OrderMain.ListOrderDetail.Count; i++)
            {
                float yStart = l_y;
                posPrinter.DrawString(OrderMain.ListOrderDetail[i].ProductName, e, new Font("Arial", 10, FontStyle.Bold), l_y, 1);
                l_y = posPrinter.DrawString(OrderMain.ListOrderDetail[i].Qty.ToString(), e, new Font("Arial", 10, FontStyle.Bold), l_y, 2);
                posPrinter.DrawString("$" + money.Format2(OrderMain.ListOrderDetail[i].Price.ToString()), e, new Font("Arial", 10, FontStyle.Bold), yStart, 3);
                if (OrderMain.ListOrderDetail[i].ListOrderDetailModifire.Count > 0)
                {
                    for (int j = 0; j < OrderMain.ListOrderDetail[i].ListOrderDetailModifire.Count; j++)
                    {
                        l_y = posPrinter.DrawString("__" + OrderMain.ListOrderDetail[i].ListOrderDetailModifire[j].ModifireName, e, new Font("Arial", 10), l_y, 1);
                    }
                }
            }
            l_y += posPrinter.GetHeightPrinterLine() / 10;
            posPrinter.DrawLine("", new Font("Arial", 14), e, System.Drawing.Drawing2D.DashStyle.Dot, l_y, 1);
            posPrinter.DrawString("SubTotal:", e, new Font("Arial", 10, FontStyle.Bold), l_y, 1);
            l_y = posPrinter.DrawString("$" + money.Format2(Convert.ToDouble(OrderMain.TotalAmount)), e, new Font("Arial", 10), l_y, 3);
            if (OrderMain.Discount > 0)
            {
                posPrinter.DrawString("Discount:", e, new Font("Arial", 10, FontStyle.Bold), l_y, 1);
                l_y = posPrinter.DrawString("$" + money.Format2(OrderMain.Discount), e, new Font("Arial", 10), l_y, 3);

                posPrinter.DrawString("Total:", e, new Font("Arial", 10, FontStyle.Bold), l_y, 1);
                l_y = posPrinter.DrawString("$" + money.Format2(OrderMain.SubTotal() - OrderMain.Discount), e, new Font("Arial", 10), l_y, 3);
            }
            else
            {
                posPrinter.DrawString("Total:", e, new Font("Arial", 10, FontStyle.Bold), l_y, 1);
                l_y = posPrinter.DrawString("$" + money.Format2(OrderMain.SubTotal()), e, new Font("Arial", 10), l_y, 3);
            }
            posPrinter.DrawString("GST(Include in total):", e, new Font("Arial", 10), l_y, 1);
            l_y = posPrinter.DrawString("$1.0", e, new Font("Arial", 10), l_y, 3);
            if (OrderMain.ListPayment.Count > 0)
            {
                for (int j = 0; j < OrderMain.ListPayment.Count; j++)
                {
                    if (OrderMain.ListPayment[j].PaymentTypeID == 1)
                    {
                        posPrinter.DrawString("Cash:", e, new Font("Arial", 10), l_y, 1);
                        l_y = posPrinter.DrawString("$" + money.Format2(OrderMain.ListPayment[j].Total * 1000), e, new Font("Arial", 10), l_y, 3);
                    }
                    if (OrderMain.ListPayment[j].PaymentTypeID == 2)
                    {
                        posPrinter.DrawString("Card:", e, new Font("Arial", 10), l_y, 1);
                        l_y = posPrinter.DrawString("$" + money.Format2(OrderMain.ListPayment[j].Total * 1000), e, new Font("Arial", 10), l_y, 3);
                        if (OrderMain.ListInvoiceByCard.Count > 0)
                        {
                            for (int i = 0; i < OrderMain.ListInvoiceByCard.Count; i++)
                            {
                                posPrinter.DrawString("--" + OrderMain.ListInvoiceByCard[i].NameCard, e, new Font("Arial", 10), l_y, 1);
                                l_y = posPrinter.DrawString("$" + money.Format2(Convert.ToDouble(OrderMain.ListInvoiceByCard[i].Total)), e, new Font("Arial", 10), l_y, 3);
                            }
                        }
                    }
                }
            }
            if (OrderMain.Change > 0)
            {
                posPrinter.DrawString("Change:", e, new Font("Arial", 10), l_y, 1);
                l_y = posPrinter.DrawString("$" + money.Format2(OrderMain.Change), e, new Font("Arial", 10), l_y, 3);
            }
            l_y += posPrinter.GetHeightPrinterLine() / 2;
            l_y  = posPrinter.DrawString(cofig.Web, e, new Font("Arial", 10), l_y, 2);
            l_y  = posPrinter.DrawString(cofig.Logan, e, new Font("Arial", 10), l_y, 2);
            l_y  = posPrinter.DrawString(cofig.Note, e, new Font("Arial", 10), l_y, 2);
        }
Esempio n. 4
0
        public void BindOrder(OrderDateModel OrderMain)
        {
            try
            {
                detailScreen();
                if (OrderMain.ListSeatOfOrder.Count > 0)
                {
                    OrderMain.IsLoadFromData = true;

                    Boolean addSet;
                    foreach (SeatModel seat in OrderMain.ListSeatOfOrder)
                    {
                        addSet = true;
                        if (OrderMain.ListOrderDetail.Count > 0)
                        {
                            for (int i = 0; i < OrderMain.ListOrderDetail.Count; i++)
                            {
                                if (OrderMain.ListOrderDetail[i].Seat == seat.Seat)
                                {
                                    if (addSet)
                                    {
                                        UCSeat ucSeat = new UCSeat();
                                        ucSeat.lblSeat.Text = "Seat " + seat.Seat.ToString();
                                        ucSeat.Tag          = seat.Seat;

                                        flowLayoutPanel1.Controls.Add(ucSeat);
                                        indexControl = flowLayoutPanel1.Controls.Count;
                                        addSet       = false;
                                    }
                                    addOrder(OrderMain.ListOrderDetail[i]);
                                    indexControl++;
                                    for (int j = 0; j < OrderMain.ListOrderDetail[i].ListOrderDetailModifire.Count; j++)
                                    {
                                        UCItemModifierOfMenu uc = new UCItemModifierOfMenu();
                                        uc.Tag = OrderMain.ListOrderDetail[i].ListOrderDetailModifire[j];

                                        addModifreToOrder(uc, OrderMain.ListOrderDetail[i].ListOrderDetailModifire[j]);
                                        indexControl++;
                                    }
                                }
                                else
                                {
                                    if (OrderMain.ListOrderDetail[i].Seat == 0)
                                    {
                                        addOrder(OrderMain.ListOrderDetail[i]);
                                        indexControl++;
                                        for (int j = 0; j < OrderMain.ListOrderDetail[i].ListOrderDetailModifire.Count; j++)
                                        {
                                            UCItemModifierOfMenu uc = new UCItemModifierOfMenu();
                                            uc.Tag = OrderMain.ListOrderDetail[i].ListOrderDetailModifire[j];

                                            addModifreToOrder(uc, OrderMain.ListOrderDetail[i].ListOrderDetailModifire[j]);
                                            indexControl++;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                else
                {
                    if (OrderMain.ListOrderDetail.Count > 0)
                    {
                        OrderMain.IsLoadFromData = true;

                        for (int i = 0; i < OrderMain.ListOrderDetail.Count; i++)
                        {
                            addOrder(OrderMain.ListOrderDetail[i]);

                            for (int j = 0; j < OrderMain.ListOrderDetail[i].ListOrderDetailModifire.Count; j++)
                            {
                                UCItemModifierOfMenu uc = new UCItemModifierOfMenu();
                                uc.Tag = OrderMain.ListOrderDetail[i].ListOrderDetailModifire[j];

                                addModifreToOrder(uc, OrderMain.ListOrderDetail[i].ListOrderDetailModifire[j]);
                            }
                        }
                    }
                }
                this.lblSubtotal.Text = money.Format2(OrderMain.SubTotal());
                Double gst = Convert.ToDouble(OrderMain.TotalAmount) / 11000;
                if (gst < 1)
                {
                    this.lblTax.Text = "$0" + money.Format2(Convert.ToDouble(OrderMain.TotalAmount) / 11);
                }
                else
                {
                    this.lblTax.Text = money.Format2(Convert.ToDouble(OrderMain.TotalAmount) / 11);
                }

                this.lblTotal.Text = money.Format2(OrderMain.SubTotal());
            }
            catch (Exception ex)
            {
                SystemLog.LogPOS.WriteLog("POS::frmCustomerDisplay:::::::::::::::::::" + ex.Message);
            }
        }