public Form ShowViewWithKey(string Key) { if (!BaseWinFramework.CheckModuleAccessWithError(ModuleName, SecurityVarName.DocumentView, true)) { return(null); } using (new WaitCursor()) { CheckEntityType(); _Form.Show(); if (_UIN != null) { _UIN.SetSecurity(ModuleName); _UIN.FindKey(Key); } else if (_Ief != null) { _Ief.ShowViewWithKey(Key); } _Form.BringToFront(); return(_Form); } }
public Form ShowView(string Condition, params FieldParam[] Parameters) { if (!BaseWinFramework.CheckModuleAccessWithError(ModuleName, SecurityVarName.DocumentView, true)) { return(null); } using (new WaitCursor()) { CheckEntityType(); _Form.Show(); if (_UIN != null) { _UIN.SetSecurity(ModuleName); _UIN.FindData(Condition, Parameters); } else if (_Ief != null) { _Ief.ShowView(Condition, Parameters); } _Form.BringToFront(); return(_Form); } }
public Form ShowTabular() { if (!BaseWinFramework.CheckModuleAccessWithError(ModuleName, SecurityVarName.ReportView, true)) { return(null); } using (new WaitCursor()) { if (!TypeChecked) { CheckEntityType(); } if (_UIN != null) { IRuleInitUI riu = (IRuleInitUI)_UIN.Entity; _DataFilter = riu.GetBrowseFilter(); BrowseColumns = riu.GetBrowseColumns(); riu.GetBrowseSql(out BrowseSql, out BrowseCondition, out BrowseOrder); BrowseFormat.Clear(); riu.GetBrowseFormat(BrowseFormat); TableDef td = MetaData.GetTableDef(riu.GetType()); if (riu.GetFieldTransactionDate().Length == 0) { fldTransactionDate = td.fldTransactionDate; } else { fldTransactionDate = td.GetFieldDef( riu.GetFieldTransactionDate()); } } if (_BrowseForm == null || _BrowseForm.IsDisposed || _BrowseType != BrowseType.Tabular) { if (BaseWinFramework.TouchScreenVersion) { _BrowseForm = new frmGridReportTC(); } else { _BrowseForm = new frmGridReport(); } _BrowseForm.MdiParent = BaseWinFramework._MdiParent; ((IBrowseForm)_BrowseForm).ShowForm(this, ModuleName); _BrowseType = BrowseType.Tabular; } else { _BrowseForm.BringToFront(); } return(_BrowseForm); } }
public Form ShowFreeLayout() { if (!BaseWinFramework.CheckModuleAccessWithError(ModuleName, SecurityVarName.ReportView, true)) { return(null); } using (new WaitCursor()) { if (!TypeChecked) { CheckEntityType(); } if (_UIN != null) { IRuleInitUI riu = (IRuleInitUI)_UIN.Entity; _DataFilter = riu.GetBrowseFilter(); BrowseColumns = riu.GetBrowseColumns(); riu.GetBrowseSql(out BrowseSql, out BrowseCondition, out BrowseOrder); BrowseFormat.Clear(); riu.GetBrowseFormat(BrowseFormat); } if (_BrowseForm == null || _BrowseForm.IsDisposed || _BrowseType != BrowseType.FreeLayout) { if (BaseWinFramework.mdiRibbonControl != null) { _BrowseForm = new frmFreeReport(); } else { _BrowseForm = new frmFreeReport2(); } _BrowseForm.MdiParent = BaseWinFramework._MdiParent; ((IFreeReport)_BrowseForm).ShowForm(this, ModuleName); _BrowseType = BrowseType.FreeLayout; } else { _BrowseForm.BringToFront(); } return(_BrowseForm); } }
public Form ShowFreeLayout(string FreeFilter, object TransStartDate, object TransEndDate, params object[] Parameters) { if (!BaseWinFramework.CheckModuleAccessWithError(ModuleName, SecurityVarName.ReportView, true)) { return(null); } using (new WaitCursor()) { if (!TypeChecked) { CheckEntityType(); } if (_BrowseForm == null || _BrowseForm.IsDisposed || _BrowseType != BrowseType.FreeLayout) { if (BaseWinFramework.mdiRibbonControl != null) { _BrowseForm = new frmFreeReport(); } else { _BrowseForm = new frmFreeReport2(); } _BrowseForm.MdiParent = BaseWinFramework._MdiParent; _BrowseType = BrowseType.FreeLayout; ((IFreeReport)_BrowseForm).ShowForm2(this, ModuleName, FreeFilter, TransStartDate, TransEndDate, Parameters); } else { ((IFreeReport)_BrowseForm).ShowForm3( FreeFilter, TransStartDate, TransEndDate, Parameters); } return(_BrowseForm); } }