Exemplo n.º 1
0
        private void btn_Click(object sender, EventArgs e)
        {
            string btnName = ((MaterialFlatButton)sender).Name;

            if (btnName == "LichSuHoaDon")
            {
                FrmLichSuHoaDon frmLichSuHoaDon = FrmLichSuHoaDon.Instance;
                frmLichSuHoaDon.MinimizeBox = false;

                FrmMain.Instance.TopMost = false;
                frmLichSuHoaDon.ShowDialog();
                return;
            }

            FrmHienThiBaoCao frm = new FrmHienThiBaoCao();

            if (btnName == "TatCaMon")
            {
                frm.HienTatCaMon();
            }
            else if (btnName == "MonGomNhom")
            {
                frm.HienThiMonTheoNhom();
            }
            else if (btnName == "TatCaHoaDon")
            {
                frm.HienThiTatCacHoaDon();
            }
            else if (btnName == "TatCaPhieuNhap")
            {
                frm.HienTatCaPhieuNhap();
            }
            else if (btnName == "TatCaNguyenLieu")
            {
                frm.HienTatCaNguyenLieu();
            }
            else if (btnName == "HoaDonMoiNhat")
            {
                frm.HienThiHoaDonMoiNhat();
            }
            else if (btnName == "HoaDonTrongNgay")
            {
                frm.HienThiTatHoaDonLapTrongNgay();
            }
            else if (btnName == "PhieuNhapMoiNhat")
            {
                frm.HienThiPhieuNhapMoiNhat();
            }
            else if (btnName == "PhieuNhapTrongNgay")
            {
                frm.TatCaPhieuNhapLapTrongNgay();
            }
            this.TopMost = false;
            frm.Show();
        }
Exemplo n.º 2
0
        private void btnBaoCao_Click(object sender, EventArgs e)
        {
            FrmMain.Instance.TopMost = false;
            FrmHienThiBaoCao frm = new FrmHienThiBaoCao();

            if (radTatCaMon.Checked)
            {
                frm.HienTatCaMon();
            }
            else if (radTheoLoaiMon.Checked)
            {
                frm.HienMonTheoLoai((int)cmbLoaiMon.SelectedValue);
            }
            else if (radGomNhomMon.Checked)
            {
                frm.HienThiMonTheoNhom();
            }
            else if (radTatCaHoaDon.Checked)
            {
                frm.HienThiTatCacHoaDon();
            }
            else if (radHoaDonLapTrongNgay.Checked)
            {
                frm.HienThiTatHoaDonLapTrongNgay();
            }
            else if (radHoaDonChonNgay.Checked)
            {
                frm.HienThiHoaDonTheoNgay((DateTime)dtpHoaDonChonNgay.Value);
            }
            else if (radHoaDonTheoThang.Checked)
            {
                frm.HienThiTatCacHoaDonTheoThang((DateTime)dtpTimeStart.Value, (DateTime)dtpTimeEnd.Value);
            }
            else if (radTatCaNguyenLieu.Checked)
            {
                frm.HienTatCaNguyenLieu();
            }
            else if (radTatCaPhieuNhap.Checked)
            {
                frm.HienTatCaPhieuNhap();
            }
            else if (radPhieuNhapTrongNgay.Checked)
            {
                frm.TatCaPhieuNhapLapTrongNgay();
            }
            else if (radPhieuNhapTheoThang.Checked)
            {
                frm.HienThiTatCacPhieuNhapTheoMoc((DateTime)dtpPhieuNhapStart.Value, (DateTime)dtpPhieuNhapEnd.Value);
            }
            else if (radPhieuNhapChonNgay.Checked)
            {
                frm.HienThiPhieuNhapTheoNgay((DateTime)dtpPhieuNhapChonNgay.Value);
            }
            else if (radHoaDonMoiNhat.Checked)
            {
                frm.HienThiHoaDonMoiNhat();
            }
            else if (radPhieuNhapNew.Checked)
            {
                frm.HienThiPhieuNhapMoiNhat();
            }
            else if (radDoanhThuTheoNgay.Checked)
            {
                frm.DoanhThuTheoNgay((DateTime)dtpDoanhThuTheoNgay.Value);
            }
            else if (radDoanhThuTheoMoc.Checked)
            {
                frm.DoanhThuTheoMoc((DateTime)dtpDoanhThuStart.Value, (DateTime)dtpDoanhThuEnd.Value);
            }
            frm.Show();
        }