Ejemplo n.º 1
0
        private void OnXuatHoaDon()
        {
            dlgHoaDonHopDong dlg = new dlgHoaDonHopDong(null);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                DisplayAsThread();
            }
        }
Ejemplo n.º 2
0
        private void OnExportInvoice()
        {
            List <DataRow> phieuThuHopDongList = new List <DataRow>();

            phieuThuHopDongList.Add(_drPhieuThu);
            dlgHoaDonHopDong dlg = new dlgHoaDonHopDong(phieuThuHopDongList);

            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                _isExportedInvoice       = true;
                btnExportInvoice.Enabled = false;
            }
        }
Ejemplo n.º 3
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;
            dlgHoaDonHopDong dlg       = new dlgHoaDonHopDong(drInvoice, true);

            dlg.ShowDialog();
        }
Ejemplo n.º 4
0
        private void OnExportInvoice()
        {
            List <DataRow> exportedInvoiceList   = new List <DataRow>();
            List <DataRow> noExportedInvoiceList = new List <DataRow>();
            List <DataRow> checkedRows           = CheckedPTRows;

            foreach (DataRow row in checkedRows)
            {
                bool isExported = Convert.ToBoolean(row["IsExported"]);
                if (!isExported)
                {
                    noExportedInvoiceList.Add(row);
                }
                else
                {
                    exportedInvoiceList.Add(row);
                }
            }

            if (exportedInvoiceList.Count > 0)
            {
                MsgBox.Show(Application.ProductName, "(Một số) phiếu thu đã xuất hóa đơn rồi. Vui lòng kiểm tra lại.", IconType.Information);
                return;
            }

            if (MsgBox.Question(Application.ProductName, "Bạn có muốn xuất hóa đơn ?") == DialogResult.No)
            {
                return;
            }

            dlgHoaDonHopDong dlg = new dlgHoaDonHopDong(noExportedInvoiceList);

            dlg.ShowDialog();

            HighlightExportedInvoice();
        }