public static void GetDashboardsCount(Guid applicationId, ref List <DashboardCount> counts, Guid userId, Guid?nodeTypeId, Guid?nodeId, string nodeAdditionalId, DashboardType type) { string spName = GetFullyQualifiedName("GetDashboardsCount"); try { if (nodeId == Guid.Empty) { nodeId = null; } if (nodeTypeId == Guid.Empty) { nodeTypeId = null; } string strType = type == DashboardType.NotSet ? null : type.ToString(); IDataReader reader = ProviderUtil.execute_reader(spName, applicationId, userId, nodeTypeId, nodeId, nodeAdditionalId, strType); ProviderUtil.parse_dashboards_count(ref reader, ref counts); } catch (Exception ex) { LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.NTFN); } }
public static String TileList(DashboardType type, Boolean loadfromRecycleBin = false, Int32 idCommunity = -1, long idTile = 0, long fromIdDashboard = 0, WizardDashboardStep step = WizardDashboardStep.None) { String url = tilemodulehome; if (loadfromRecycleBin) { url = url + "RecycleBin.aspx?recycle=true"; } else { url = url + "List.aspx?recycle=false"; } url = url + (idCommunity > 0 ? "&idCommunity=" + idCommunity.ToString() : ""); url = url + "&type=" + type.ToString(); if (fromIdDashboard > 0) { url = url + "&fromIdDashboard=" + fromIdDashboard.ToString() + ((step == WizardDashboardStep.None) ? "" : "&step=" + step.ToString()); } if (idTile > 0) { url = url + "&idTile=" + idTile.ToString() + "#tile" + idTile.ToString(); } return(url); }
public static String DashboardUrl(long idDashboard, DashboardType type, Int32 idCommunity = -1) { String url = "type=" + type.ToString(); url = url + (idCommunity > 0 ? "&idCommunity=" + idCommunity.ToString() : ""); url = url + (idDashboard > 0 ? "&idDashboard=" + idDashboard.ToString() : ""); return(url); }
public static String TileUrl(long idTile, DashboardType type, Int32 idCommunity = -1, long fromIdDashboard = 0, WizardDashboardStep step = WizardDashboardStep.None) { String url = "type=" + type.ToString(); url = url + (idCommunity > 0 ? "&idCommunity=" + idCommunity.ToString() : ""); url = url + (fromIdDashboard > 0 ? "&fromIdDashboard=" + fromIdDashboard.ToString() : "") + ((step == WizardDashboardStep.None) ? "" : "&step=" + step.ToString()); url = url + (idTile > 0 ? "&idTile=" + idTile.ToString() : ""); return(url); }
public static String DashboardList(DashboardType type, Boolean loadfromRecycleBin = false, Int32 idCommunity = -1) { String url = dashboardmodulehome; if (loadfromRecycleBin) { url = url + "RecycleBin.aspx?recycle=true"; } else { url = url + "List.aspx?recycle=false"; } url = url + (idCommunity > 0 ? "&idCommunity=" + idCommunity.ToString() : ""); url = url + "&type=" + type.ToString(); return(url); }
public string toJson() { return("{\"Type\":\"" + (Type == DashboardType.NotSet ? string.Empty : Type.ToString()) + "\"" + ",\"SubType\":\"" + (SubType == DashboardSubType.NotSet ? string.Empty : SubType.ToString()) + "\"" + ",\"SubTypeTitle\":\"" + Base64.encode(SubTypeTitle) + "\"" + ",\"NodeTypeID\":\"" + (!NodeTypeID.HasValue ? string.Empty : NodeTypeID.Value.ToString()) + "\"" + ",\"NodeType\":\"" + Base64.encode(NodeType) + "\"" + ",\"DateOfEffect\":\"" + (!DateOfEffect.HasValue ? string.Empty : DateOfEffect.Value.ToString()) + "\"" + ",\"DateOfEffect_Jalali\":\"" + (!DateOfEffect.HasValue ? string.Empty : PublicMethods.get_local_date(DateOfEffect.Value, true, true)) + "\"" + ",\"ToBeDone\":" + ToBeDone.ToString() + ",\"NotSeen\":" + NotSeen.ToString() + ",\"Done\":" + Done.ToString() + ",\"DoneAndInWorkFlow\":" + DoneAndInWorkFlow.ToString() + ",\"DoneAndNotInWorkFlow\":" + DoneAndNotInWorkFlow.ToString() + ",\"Sub\":[" + (Sub == null ? string.Empty : string.Join(",", Sub.Where(a => a != null).Select(x => x.toJson()))) + "]" + "}"); }
public static List <Guid> GetDashboards(Guid applicationId, ref List <Dashboard> retDashboards, Guid?userId, Guid?nodeTypeId, Guid?nodeId, string nodeAdditionalId, DashboardType dashboardType, DashboardSubType subType, string subTypeTitle, bool?done, DateTime?dateFrom, DateTime?dateTo, string searchText, bool?getDistinctItems, bool?inWorkFlowState, int?lowerBoundary, int?count, ref long totalCount) { string spName = GetFullyQualifiedName("GetDashboards"); List <Guid> retList = new List <Guid>(); try { if (userId == Guid.Empty) { userId = null; } if (nodeTypeId == Guid.Empty) { nodeTypeId = null; } if (nodeId == Guid.Empty) { nodeId = null; } if (lowerBoundary == 0) { lowerBoundary = null; } if (!count.HasValue || count <= 0) { count = 50; } if (!string.IsNullOrEmpty(nodeAdditionalId)) { nodeAdditionalId = nodeAdditionalId.Trim(); } if (string.IsNullOrEmpty(nodeAdditionalId)) { nodeAdditionalId = null; } string strDashboardType = dashboardType == DashboardType.NotSet ? null : dashboardType.ToString(); string strSubType = subType == DashboardSubType.NotSet ? (string.IsNullOrEmpty(subTypeTitle) ? null : subTypeTitle) : subType.ToString(); IDataReader reader = ProviderUtil.execute_reader(spName, applicationId, userId, nodeTypeId, nodeId, nodeAdditionalId, strDashboardType, strSubType, done, dateFrom, dateTo, ProviderUtil.get_search_text(searchText), getDistinctItems, inWorkFlowState, lowerBoundary, count); if (!getDistinctItems.HasValue || !getDistinctItems.Value) { ProviderUtil.parse_dashboards(ref reader, ref retDashboards, ref totalCount); } else { ProviderUtil.parse_guids(ref reader, ref retList, ref totalCount); } return(retList); } catch (Exception ex) { LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.NTFN); return(new List <Guid>()); } }