Beispiel #1
0
        private void OnDisplayInvoiceInfo()
        {
            if (dgInvoice.SelectedRows == null || dgInvoice.SelectedRows.Count <= 0)
            {
                MsgBox.Show(Application.ProductName, "Vui lòng chọn 1 hóa đơn.", IconType.Information);
                return;
            }

            DataRow drInvoice     = (dgInvoice.SelectedRows[0].DataBoundItem as DataRowView).Row;
            string  loaiHoaDonStr = drInvoice["LoaiHoaDon"].ToString();

            Common.LoaiHoaDon lhd = Common.LoaiHoaDon.HoaDonThuoc;
            if (loaiHoaDonStr == "Hóa đơn thuốc")
            {
                lhd = Common.LoaiHoaDon.HoaDonThuoc;
            }
            else if (loaiHoaDonStr == "Hóa đơn dịch vụ")
            {
                lhd = Common.LoaiHoaDon.HoaDonDichVu;
            }
            else if (loaiHoaDonStr == "Hóa đơn xuất trước")
            {
                lhd = Common.LoaiHoaDon.HoaDonXuatTruoc;
            }
            else
            {
                lhd = Common.LoaiHoaDon.HoaDonHopDong;
            }

            dlgHoaDonThuoc dlg = new dlgHoaDonThuoc(drInvoice, true);

            dlg.LoaiHoaDon = lhd;
            dlg.ShowDialog();
        }
Beispiel #2
0
        private void OnXuatHoaDon()
        {
            dlgHoaDonThuoc dlg = new dlgHoaDonThuoc(null);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                DisplayAsThread();
            }
        }
        private void OnExportInvoice()
        {
            List <DataRow> phieuThuThuocList = new List <DataRow>();

            phieuThuThuocList.Add(_drPhieuThu);
            dlgHoaDonThuoc dlg = new dlgHoaDonThuoc(phieuThuThuocList);

            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                _isExportedInvoice       = true;
                btnExportInvoice.Enabled = false;
            }
        }
Beispiel #4
0
        private void OnDisplayInvoiceInfo()
        {
            if (dgInvoice.SelectedRows == null || dgInvoice.SelectedRows.Count <= 0)
            {
                MsgBox.Show(Application.ProductName, "Vui lòng chọn 1 hóa đơn.", IconType.Information);
                return;
            }

            DataRow        drInvoice = (dgInvoice.SelectedRows[0].DataBoundItem as DataRowView).Row;
            dlgHoaDonThuoc dlg       = new dlgHoaDonThuoc(drInvoice, true);

            dlg.ShowDialog();
        }