コード例 #1
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);
            }
        }
コード例 #2
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);
     }
 }