Beispiel #1
0
 void btnOpenItemItem_Click(object sender, EventArgs e)
 {
     frmOpenItem frm = new frmOpenItem(0);
     if (frmOpacity.ShowDialog(this, frm) == System.Windows.Forms.DialogResult.OK)
     {
         int resul = 0;
         OrderOpenItemModel OpenItem = new OrderOpenItemModel();
         OpenItem.ItemNameDesc = frm.items.ProductName;
         OpenItem.ItemNameShort = frm.items.ProductName;
         OpenItem.UnitPrice = Convert.ToInt32(frm.items.Price);
         OpenItem.PrintType = frm.items.Printer;
         OpenItem.PrinterID = frm.items.Printer;
         resul = OrderService.InsertOpenItem(OpenItem);
         if (resul == 1)
         {
             frm.items.DynID = OrderService.GetIDLastInsertOpenItem();
             frm.items.OrderID = OrderMain.OrderID;
             frm.items.Qty = 1;
             if (seat > 0)
                 frm.items.Seat = seat;
             if (flagUcSeatClick == 1)
                 frm.items.Seat = numSeat;
             frm.items.ChangeStatus = 1;
             OrderMain.addItemToList(frm.items);
             addOrder(frm.items);
             lblSubtotal.Text = "$" + money.Format2(OrderMain.SubTotal().ToString());
         }
     }
 }
Beispiel #2
0
        void btnOpenItemSubItem_Click(object sender, EventArgs e)
        {
            try
            {
                frmOpenItem frm = new frmOpenItem(1);
                if (frmOpacity.ShowDialog(this, frm) == System.Windows.Forms.DialogResult.OK)
                {
                    //Order.Item itemTemp = new Order.Item();
                    OrderDetailModel itemTemp = new OrderDetailModel();

                    OrderOpenItemModel OpenItem = new OrderOpenItemModel();
                    OpenItem.ItemNameDesc = frm.items.ProductName;
                    OpenItem.ItemNameShort = frm.items.ProductName;
                    OpenItem.UnitPrice = Convert.ToInt32(frm.items.Price);
                    int resul = OrderService.InsertOpenItem(OpenItem);
                    if (resul == 1)
                    {
                        frm.items.DynID = OrderService.LastDynID();
                        frm.items.OrderID = OrderMain.OrderID;
                        frm.items.Qty = 1;
                        if (seat > 0)
                            frm.items.Seat = seat;
                        if (flagUcSeatClick == 1)
                            frm.items.Seat = numSeat;
                        itemTemp = frm.items;
                        OrderDetailModifireModel modifierTemp = new OrderDetailModifireModel();
                        modifierTemp.ModifireName = itemTemp.ProductName;
                        modifierTemp.Price = itemTemp.Price;
                        modifierTemp.OrderID = itemTemp.OrderID;
                        modifierTemp.ProductID = itemTemp.ProductID;
                        modifierTemp.DynID = itemTemp.DynID;
                        modifierTemp.Seat = itemTemp.Seat;
                        modifierTemp.ChangeStatus = 1;

                        OrderMain.addModifierToList(modifierTemp, keyItemTemp);
                        UCItemModifierOfMenu ucItemModifierOfMenu = new UCItemModifierOfMenu();
                        this.addModifreToOrder(ucItemModifierOfMenu, modifierTemp);
                    }
                    //Order.Modifier modifierTemp = new Order.Modifier();

                }
            }
            catch (Exception ex)
            {
                LogPOS.WriteLog("btnOpenItemSubItem_Click::::::::::::::::::::::::::" + ex.Message);
            }
        }
Beispiel #3
0
 void btn_Click(object sender, EventArgs e)
 {
     try
     {
         frmOpenItem frm = new frmOpenItem(1);
         if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             OrderMain.addItemToList(frm.items);
             addOrder(frm.items);
             lblSubtotal.Text = "$" + money.Format2(OrderMain.SubTotal().ToString());
         }
     }
     catch (Exception ex)
     {
         LogPOS.WriteLog("btn_Click:::::::::::::::::::::::::::::" + ex.Message);
     }
 }