예제 #1
0
        private void btnAddSeat_Click(object sender, EventArgs e)
        {
            frmAddSeat frm = new frmAddSeat();

            if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                Seat = frm.NumberSeat;
                SeatModel seatAdd = new SeatModel();
                seatAdd.Seat = Seat;
                lstSeat.Add(seatAdd);
                OrderSlpitNew.ListSeatOfOrder = lstSeat;
                UCSeat ucSeat = new UCSeat();
                ucSeat.lblSeat.Text = "Seat " + Seat;
                //ucSeat.Click += ucSeat_Click;
                lblSeat.Text = Seat.ToString();
                flpNewTable.Controls.Add(ucSeat);
            }
        }
예제 #2
0
파일: frmOrder.cs 프로젝트: pcthanh/POSEZ2U
        private void btnAddSeat_Click(object sender, EventArgs e)
        {
            try
            {
                frmAddSeat frm = new frmAddSeat();

                if (frmOpacity.ShowDialog(this, frm) == System.Windows.Forms.DialogResult.OK)
                {

                    seat = frm.NumberSeat;
                    if (isChekSeat(seat))
                    {
                        frmMessager frmseat = new frmMessager("AddSeat", "Seat Exists");
                        frmOpacity.ShowDialog(this, frmseat);
                    }
                    else
                    {
                        SeatModel seatAdd = new SeatModel();
                        seatAdd.Seat = seat;

                        lstSeat.Add(seatAdd);
                        OrderMain.ListSeatOfOrder.Add(seatAdd);
                        UCSeat ucSeat = new UCSeat();
                        ucSeat.lblSeat.Text = "Seat " + seat;
                        ucSeat.Click += ucSeat_Click;
                        lblSeat.Text = seat.ToString();
                        flpOrder.Controls.Add(ucSeat);
                        flagUcSeatClick = 0;
                        ClearBackColorSeat();
                    }
                    //OrderMain.addSeat(seat);

                }
            }
            catch (Exception ex)
            {
                LogPOS.WriteLog("btnAddSeat_Click::::::::::::::::::::::::::::::::" + ex.Message);
            }
        }
예제 #3
0
파일: frmSeat.cs 프로젝트: pcthanh/POSEZ2U
 private void btnAddSeat_Click(object sender, EventArgs e)
 {
     frmAddSeat frm = new frmAddSeat();
     if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         Seat = frm.NumberSeat;
         SeatModel seatAdd = new SeatModel();
         seatAdd.Seat = Seat;
         lstSeat.Add(seatAdd);
         OrderSlpitNew.ListSeatOfOrder = lstSeat;
         UCSeat ucSeat = new UCSeat();
         ucSeat.lblSeat.Text = "Seat " + Seat;
         //ucSeat.Click += ucSeat_Click;
         lblSeat.Text = Seat.ToString();
         flpNewTable.Controls.Add(ucSeat);
     }
 }