public void RunLink(STViewsInfo viewIfo, ViewMode mode, bool isShowDialog, Guid iMainID, ABCScreenAction action) { if (viewIfo != null) { ABCHelper.ABCWaitingDialog.Show("", "Đang mở . . .!"); ABCScreen.ABCBaseScreen scr = ABCScreenFactory.GetABCScreen(viewIfo, mode); if (scr != null) { scr.InvalidateData(iMainID); ABCHelper.ABCWaitingDialog.Close(); if (action != ABCScreenAction.None) { scr.DoAction(action, true); } if (action == ABCScreenAction.Disable) { scr.UIManager.View.ShowToolbar = false; } if (isShowDialog) { scr.ShowDialog(); } else { scr.Show(); } } ABCHelper.ABCWaitingDialog.Close(); } }
public void RunLink(String strScreenName, ViewMode mode, bool isShowDialog, ABCScreenAction action, params object[] objParams) { ABCHelper.ABCWaitingDialog.Show("", "Đang mở . . .!"); ABCScreen.ABCBaseScreen scr = ABCScreenFactory.GetABCScreen(strScreenName, mode); if (scr != null) { scr.InvalidateData(objParams); } ABCHelper.ABCWaitingDialog.Close(); if (scr != null) { if (action != ABCScreenAction.None) { scr.DoAction(action, true); } if (action == ABCScreenAction.Disable) { scr.UIManager.View.ShowToolbar = false; } if (isShowDialog) { scr.ShowDialog(); } else { scr.Show(); } } }
public static Form GetMainScreen( ) { STViewsInfo info = (STViewsInfo) new STViewsController().GetObjectByNo("View0"); if (info == null) { return(null); } ABCScreen.ABCBaseScreen scr = ABCScreen.ABCScreenFactory.GetABCScreen(info, ViewMode.Runtime); if (scr != null) { return(scr.GetDialog()); } return(null); }
public void TestCurrentScreen( ) { if (OwnerStudio.SurfaceManager.ActiveDesignSurface == null) { return; } ABCView currentView = (ABCView)(((HostSurface)OwnerStudio.SurfaceManager.ActiveDesignSurface).DesignerHost.RootComponent); currentView.SaveToXML("temp.xml"); ABCScreen.ABCBaseScreen scr = null; String strSourceCode = ((HostSurface)OwnerStudio.SurfaceManager.ActiveDesignSurface).OwnerHostControl.SourceCSharpEditor.Text; if (currentView.DataField == null) { if (currentView.IsUseSourceCode && String.IsNullOrWhiteSpace(strSourceCode) == false) { ABCScreen.ABCScreenFactory.DebugScreen("temp.xml", strSourceCode, "ABCTemp", ViewMode.Test); } else { ABCScreen.ABCScreenFactory.RunScreen("temp.xml", null, ViewMode.Test); } } else { if (String.IsNullOrWhiteSpace(strSourceCode)) { strSourceCode = currentView.DataField.STViewCode; } if (currentView.DataField.STViewUseCode && String.IsNullOrWhiteSpace(strSourceCode) == false) { ABCScreen.ABCScreenFactory.DebugScreen("temp.xml", strSourceCode, currentView.DataField.STViewNo, ViewMode.Test); } else { ABCScreen.ABCScreenFactory.RunScreen("temp.xml", currentView.DataField, ViewMode.Test); } } }
public void OpenScreenForNew(String strTableName, ViewMode mode, bool isShowDialog) { #region Get View STViewsInfo viewResult = null; STViewsController viewCtrl = new STViewsController(); List <BusinessObject> lstViews = viewCtrl.GetListFromDataset(viewCtrl.GetDataSet(String.Format("SELECT * FROM STViews WHERE [MainTableName] = '{0}' ", strTableName))); foreach (STViewsInfo viewIfo in lstViews) { if (String.IsNullOrWhiteSpace(viewIfo.MainFieldName) == false && DataStructureProvider.IsTableColumn(strTableName, viewIfo.MainFieldName)) { viewResult = viewIfo; break; } } if (viewResult == null && lstViews.Count > 0) { viewResult = lstViews[0] as STViewsInfo; } #endregion if (viewResult != null) { ABCHelper.ABCWaitingDialog.Show("", "Đang mở . . .!"); ABCScreen.ABCBaseScreen scr = ABCScreenFactory.GetABCScreen(viewResult, mode); scr.DoAction(ABCScreenAction.New, true); ABCHelper.ABCWaitingDialog.Close(); if (isShowDialog) { scr.ShowDialog(); } else { scr.Show(); } } }