/// <summary> /// Prints the data. /// </summary> protected override void PrintData() { var frmParam = new FrmXtraPrintVoucherByLot { RefType = RefType.FixedAssetIncrement }; frmParam.Show(); }
/// <summary> /// Prints the data. /// </summary> protected override void PrintData() { var frmParam = new FrmXtraPrintVoucherByLot { RefType = RefType.ReceiptCash }; frmParam.Show(); }
// In thẻ tài sản cố định protected virtual void PrintFixedAssetData() { try { ActionMode = ActionModeEnum.None; Cursor.Current = Cursors.WaitCursor; var reportHelper = new ReportHelper(); _reportList = _reportListPresenter.GetAllReportList(); reportHelper.ReportLists = _reportList; using (var frmXtraPrintVoucherByLot = new FrmXtraPrintVoucherByLot()) { frmXtraPrintVoucherByLot.RefType = RefType.FixedAssetDictionary; IList <ReportListModel> reportLists = _reportList.FindAll(item => item.ReportID.Contains("ReportFixedAsset")); frmXtraPrintVoucherByLot.InitComboData(reportLists); frmXtraPrintVoucherByLot.RefID = int.Parse(PrimaryKeyValue); if (frmXtraPrintVoucherByLot.ShowDialog() == DialogResult.OK) { var refIds = frmXtraPrintVoucherByLot.SelectedFa; var reportVoucherId = frmXtraPrintVoucherByLot.ReportID; reportHelper.CommonVariable = new GlobalVariable { RefIdList = refIds }; if (reportVoucherId != null) { reportHelper.PrintPreviewReport(null, reportVoucherId, false); } } } } catch (Exception ex) { XtraMessageBox.Show(ex.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { Cursor.Current = Cursors.Default; } }