Exemple #1
0
        private void OnAddPhieuThu()
        {
            dlgAddPhieuThuThuoc2 dlg = new dlgAddPhieuThuThuoc2();

            if (dlg.ShowDialog(this) == DialogResult.OK)
            {
                DisplayAsThread();
            }
        }
        private void ViewPhieuThuThuoc(string phieuThuThuocGUID)
        {
            Result result = PhieuThuThuocBus.GetPhieuThuThuocAsDataTable(phieuThuThuocGUID);

            if (result.IsOK)
            {
                DataTable dt = result.QueryResult as DataTable;
                if (dt != null && dt.Rows.Count > 0)
                {
                    DataRow row = dt.Rows[0];
                    dlgAddPhieuThuThuoc2 dlg = new dlgAddPhieuThuThuoc2(row);
                    dlg.ShowDialog(this);
                }
            }
            else
            {
                MsgBox.Show(Application.ProductName, result.GetErrorAsString("PhieuThuThuocBus.GetPhieuThuThuocAsDataTable"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("PhieuThuThuocBus.GetPhieuThuThuocAsDataTable"));
            }
        }
Exemple #3
0
        private void OnViewPhieuThuThuoc()
        {
            if (dgPhieuThu.SelectedRows == null || dgPhieuThu.SelectedRows.Count <= 0)
            {
                return;
            }

            DataRow drPhieuThu       = (dgPhieuThu.SelectedRows[0].DataBoundItem as DataRowView).Row;
            dlgAddPhieuThuThuoc2 dlg = new dlgAddPhieuThuThuoc2(drPhieuThu);

            if (dlg.ShowDialog(this) == DialogResult.Cancel)
            {
                if (dlg.IsExportedInvoice)
                {
                    HighlightExportedInvoice();
                }
            }
            else
            {
                HighlightExportedInvoice();
            }
        }