예제 #1
0
 private void btn_2_Click(object sender, EventArgs e)
 {
     try
     {
         frmdatdonhang frm = new frmdatdonhang();
         frm.ShowDialog();
     }
     catch { }
 }
예제 #2
0
        private void Bt_Click(object sender, EventArgs e)
        {
            Button bt = sender as Button;
            object a  = bt.Tag;

            Globals.SetMaban(Convert.ToInt32(a));
            frmdatdonhang frm = new frmdatdonhang();
            DAOHoaDon     hd  = new DAOHoaDon();
            // kt xem ban co dang su dung hay ko
            DAOTable         ban = new DAOTable();
            DAOChiTietHoaDon ct  = new DAOChiTietHoaDon();

            if (ban.KTBanDangSD(Globals.Maban))
            {
                Globals.SetMahoadon(hd.getCurrentMahoadon(Globals.Maban));
                Globals.SetChiTietHoaDon(ct.getChiTietHoaDon(Globals.Mahoadon));
            }



            frm.Show();
            frm.FormClosed += Frm_FormClosed;
        }