private void fPOS_Load(object sender, EventArgs e) { fChonKV fchonkv = new fChonKV(0); fchonkv.ShowDialog(); if (fchonkv.MaKV != "") { MaKV = fchonkv.MaKV; KhoiTaoKhuVuc(); this.Resize += new EventHandler(fPOS_Resize); } }
private void fMoban_Load(object sender, EventArgs e) { //Khởi tạo nhóm món fChonKV fchonkv = new fChonKV(1); fchonkv.ShowDialog(); if (fchonkv.MaKV != "") { printerPOS = fchonkv.PrinterPos; printerBEP = fchonkv.PrinterBep; string sql = "select top 1 * from dmban where maposarea='" + fchonkv.MaKV + "' order by maban"; DataTable tb = db.GetDataTable(sql); if (tb != null && tb.Rows.Count != 0) { _Maban = tb.Rows[0]["MaBan"].ToString(); cBan cban = new cBan(_Maban); this.Ban = cban; } } }