public static List<WsModel> GetEngByWsId(string wsId, WsLoadType wsLoadType, bool newSession = false) { //var result = IM.Mgr.Workspace.GetWs(wsId, wsLoadType); var result = GetWs(wsId, newSession); return result; }
//--V469-583-S internal static WsModel GetWs_Admin(string wsId, out IManWorkspace imWsOut, WsLoadType wsLoadType = WsLoadType.ALL, bool newSession = false) { IManWorkspace imWs = null; //imWs = WsUtility.GetObjectByID<IManWorkspace>(wsId, newSession); imWs = WsUtility.GetObjectByID_Admin <IManWorkspace>(wsId, newSession); imWsOut = imWs; if (imWs == null) { return(null); } var wsModel = (new WsModel { IsLoaded = wsLoadType != WsLoadType.None, Description = imWs.Description, Name = imWs.Name, ObjectID = imWs.ObjectID, Owner = WsUtility.GetWsUser(imWs.Owner), SubType = imWs.SubType, WorkspaceID = imWs.WorkspaceID, WsProfile = WsUtility.ToLoad(wsLoadType, WsComponentType.Profile) ? GetWsProfile(imWs.Profile, imWs) : null, WsFldrs = WsUtility.ToLoad(wsLoadType, WsComponentType.Fldrs) ? GetWsFldrs(imWs.SubFolders, string.Empty) : null, WsGroups = WsUtility.ToLoad(wsLoadType, WsComponentType.Groups) ? GetSecurity(imWs.Security) : null }); return(wsModel); }
public static List <WsModel> GetEngByWsId(string wsId, WsLoadType wsLoadType, bool newSession = false) { //var result = IM.Mgr.Workspace.GetWs(wsId, wsLoadType); var result = GetWs(wsId, newSession); return(result); }
public static List<WsModel> GetEngByEngNum(string engNum, WsLoadType wsLoadType, bool isAdmin = false) { var projectIdForEngNum = GetProjectIdForEngNum(new List<string> { engNum }); if (projectIdForEngNum.Count == 0) return null; var wsId = WsUtility.GetWsObjectTypeId(WsObjectType.Workspace, projectIdForEngNum[0].EngId); //return GetWs(wsId); var result = IM.Mgr.Workspace.GetWs(wsId, wsLoadType, isAdmin: isAdmin); return result; }
public static List <WsModel> GetEngByEngNum(string engNum, WsLoadType wsLoadType, bool isAdmin = false) { var projectIdForEngNum = GetProjectIdForEngNum(new List <string> { engNum }); if (projectIdForEngNum.Count == 0) { return(null); } var wsId = WsUtility.GetWsObjectTypeId(WsObjectType.Workspace, projectIdForEngNum[0].EngId); //return GetWs(wsId); var result = IM.Mgr.Workspace.GetWs(wsId, wsLoadType, isAdmin: isAdmin); return(result); }
public JArray GetEngByWsId(string wsId, WsLoadType wsLoadType, bool newSession = false) { var result = AuditManager.Rep.Workspace.GetEngByWsId(wsId, wsLoadType, newSession); if (result == null) return null; result.ForEach(x => { if (x.WsProfile != null) { x.WsProfile.KPMGOnly = ExtApi.GetKPMGOnly(x.WsProfile.EngNum); } }); var retModel = JArray.FromObject(result); return retModel; }
public JArray GetEngByEngNum(string engNum, WsLoadType wsLoadType, bool isAdmin) { var result = AuditManager.Rep.Workspace.GetEngByEngNum(engNum, wsLoadType, isAdmin: isAdmin); if (result == null) return null; result.ForEach(x => { if (x.WsProfile != null) { x.WsProfile.KPMGOnly = ExtApi.GetKPMGOnly(x.WsProfile.EngNum); } }); var retModel = JArray.FromObject(result); return retModel; }
public JArray GetEngByWsId(string wsId, WsLoadType wsLoadType, bool newSession = false) { var result = AuditManager.Rep.Workspace.GetEngByWsId(wsId, wsLoadType, newSession); if (result == null) { return(null); } result.ForEach(x => { if (x.WsProfile != null) { x.WsProfile.KPMGOnly = ExtApi.GetKPMGOnly(x.WsProfile.EngNum); } }); var retModel = JArray.FromObject(result); return(retModel); }
public JArray GetEngByEngNum(string engNum, WsLoadType wsLoadType, bool isAdmin) { var result = AuditManager.Rep.Workspace.GetEngByEngNum(engNum, wsLoadType, isAdmin: isAdmin); if (result == null) { return(null); } result.ForEach(x => { if (x.WsProfile != null) { x.WsProfile.KPMGOnly = ExtApi.GetKPMGOnly(x.WsProfile.EngNum); } }); var retModel = JArray.FromObject(result); return(retModel); }
//--V469-583-E public static List <WsModel> GetWs(string wsId = null, WsLoadType wsLoadType = WsLoadType.ALL, bool newSession = false, bool isAdmin = false) { IManWorkspaces imWss = null; List <WsModel> iLWsModel = new List <WsModel>(); if (string.IsNullOrWhiteSpace(wsId)) { IManDatabase imDb = null; //--V469-583-S //imDb = newSession ? ImSession.GetNewInstance.GetDb(ImDbType.Active) : ImSession.GetInstance.GetDb(ImDbType.Active); imDb = IManageSession.Db(ImDbType.Active); //--V469-583-E if (imDb == null) { return(null); } imWss = imDb.Workspaces; foreach (IManWorkspace imWs in imWss) { IManDocumentClass imDC = imWs.SubClass; if (imDC != null) { if (imDC.Name == "EAUDIT ENGAGEMENT" || imDC.Name == "AUDIT") { iLWsModel.Add(new WsModel { IsLoaded = false, Description = imWs.Description, Name = imWs.Name, ObjectID = imWs.ObjectID, Owner = WsUtility.GetWsUser(imWs.Owner), SubType = imWs.SubType, WorkspaceID = imWs.WorkspaceID, WsProfile = null, WsFldrs = null, WsGroups = null }); } } } } else if (wsLoadType == WsLoadType.None) { IManWorkspace imWs = null; iLWsModel.Add(GetWs(wsId, out imWs, WsLoadType.None, newSession, isAdmin: isAdmin)); } else { IManWorkspace imWs = null; iLWsModel.Add(GetWs(wsId, out imWs, WsLoadType.ALL, newSession, isAdmin: isAdmin)); } return(iLWsModel); }