Exemple #1
0
        private void btnTinhtien_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult ok = new DialogResult();
                ok = MessageBox.Show("Bạn có muốn tính tiền " + label1.Text + " Không ?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (ok == DialogResult.Yes)
                {
                    MessageBox.Show("TỔNG SỐ TIỀN THANH TOÁN CỦA " + " [ " + label1.Text + " ] " + " LÀ " + lblTongTien.Text, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    tinhtien();
                    uctMonDaGoi uctMDG = new uctMonDaGoi();
                    nhung(uctMDG);

                    //uctHoaDon uctHD = new uctHoaDon();
                    //nhung(uctHD);

                    //ThemHoaDon(Models.connection.ExcuteScalar(String.Format("select IdHoaDon= dbo.fcgetIdHoaDon()")),"", lvDanhSachBan.SelectedItems[0].SubItems[1].Text, DateTime.Now,"", Convert.ToInt32(lblTongTien.Text));
                    string _IdBan = lvDanhSachBan.SelectedItems[0].SubItems[1].Text;
                    dgvGoiMon.DataSource = Controllers.GoiMonCtrl.DeleteGoiMon(_IdBan);
                    //ThemHoaDon(Models.connection.ExcuteScalar(String.Format("select IdHoaDon= dbo.fcgetIdHoaDon()")), "", lvDanhSachBan.SelectedItems[0].SubItems[1].Text, DateTime.Now, "", Convert.ToInt32(lblTongTien.Text));
                    uctGoiMon_Load(sender, e);
                }
                else
                {
                    return;
                }
            }
            catch { MessageBox.Show("Bạn chưa chọn bàn thanh toán", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); }
            uctGoiMon_Load(sender, e);
        }
Exemple #2
0
        private void btnGoimon_Click(object sender, EventArgs e)
        {
            uctMonDaGoi uctMDG = new uctMonDaGoi();

            uctGoiMon_Load(sender, e);
            nhung(uctMDG);
        }
Exemple #3
0
        private void btnTinhtien_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult ok = new DialogResult();
                ok = MessageBox.Show("Bạn có muốn tính tiền " + label1.Text + " Không ?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (ok == DialogResult.Yes)
                {
                    MessageBox.Show("TỔNG SỐ TIỀN THANH TOÁN CỦA " + " [ " + label1.Text + " ] " + " LÀ " + lblTongTien.Text, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    tinhtien();
                    uctMonDaGoi uctMDG = new uctMonDaGoi();
                    nhung(uctMDG);
                    string _IdBan = lvDanhSachBan.SelectedItems[0].SubItems[1].Text;
                    dgvGoiMon.DataSource = Controllers.GoiMonCtrl.DeleteGoiMon(_IdBan);
                    uctGoiMon_Load(sender, e);
                }
                else
                {
                    return;
                }
            }
            catch { MessageBox.Show("Bạn chưa chọn bàn thanh toán", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); }
            uctGoiMon_Load(sender, e);
        }