private void btnInPhieuDM_Click(object sender, EventArgs e) { frmBaoCao frmBC = new frmBaoCao(); frmBC.HienPhieuDatMon(_hdBH.MaHD); frmBC.Show(); }
private void btnBaoCao_Click(object sender, EventArgs e) { frmBaoCao frmBaoCao = new frmBaoCao(); if (radMon.Checked) { frmBaoCao.HienDSMon(); } else if (radLoaiMon.Checked) { frmBaoCao.HienDSLoaiMon(); } else if (radNguyenLieu.Checked) { frmBaoCao.HienDSNguyenLieu(); } else if (radLoaiNL.Checked) { frmBaoCao.HienDSLoaiNL(); } else if (radHDNhap.Checked) { frmBaoCao.HienDSHDNhap(); } else if (radHDXuat.Checked) { frmBaoCao.HienDSHDXuat(); } else if (radHDBanHang.Checked) { frmBaoCao.HienDSHDBanHang(); } else if (radTheLoaiMon.Checked) { frmBaoCao.HienDSTheLoaiMon(cboLoaiMon.SelectedValue.ToString()); } else if (radTheLoaiNL.Checked) { frmBaoCao.HienDSTheLoaiNL(cboLoaiNL.SelectedValue.ToString()); } else if (radHDNhapTheoNgay.Checked) { frmBaoCao.HienHDNhapTheoNgay(Convert.ToDateTime(cboNgayLapHD.SelectedValue)); } else if (radHDXuatTheoNgay.Checked) { frmBaoCao.HienHDXuatTheoNgay(Convert.ToDateTime(cboNgayLapHD.SelectedValue)); } else if (radHDBanHangTheoNgay.Checked) { frmBaoCao.HienHDBanHangTheoNgay(Convert.ToDateTime(cboNgayLapHD.SelectedValue)); } frmBaoCao.Show(); }
private void btnXuatHD_Click(object sender, EventArgs e) { if (txtTienCuaKH.Text != "") { _hdBH.TrangThai = 1; _hdBH.TonTai = 1; _hdBH.NgayLapHD = DateTime.Now; _hdBH.TienCuaKH = Convert.ToInt32(txtTienCuaKH.Text); _hdBH.TienThua = Convert.ToInt32(txtTienCuaKH.Text) - _hdBH.TongTien; if (HDBanHangBUS.CapNhatHoaDon(_hdBH)) { MessageBox.Show("Đặt món thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.None); int tienKH = int.Parse(txtTienCuaKH.Text.Replace(",", "")); string tienCuaKH = String.Format("{0:#,##0}", tienKH); int tienThua = Convert.ToInt32(txtTienCuaKH.Text) - _hdBH.TongTien; string tienThuaKH = String.Format("{0:#,##0}", tienThua); frmBaoCao._tienMat = tienCuaKH; frmBaoCao._tienThua = tienThuaKH; frmBaoCao frmBC = new frmBaoCao(); frmBC.HienHDBanHang(_hdBH.MaHD); frmBC.Show(); frmDatMon frmDM = new frmDatMon(); frmDM.MdiParent = this.MdiParent; frmDM.Dock = DockStyle.Fill; frmDM.Show(); this.Close(); } else { MessageBox.Show("Đặt món thất bại!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("Mời bạn nhập tiền khách đưa!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } }