public static string GetAssociations(string childId) { DataTable dt = new LoadControlsDao().GetAssociations(childId); StringBuilder sb = new StringBuilder(); sb.Append("<OL>"); foreach (DataRow row in dt.Rows) { sb.Append("<li>"); sb.Append("<span>"); sb.Append(row["Firstname"].ToString() + " " + row["lastname"].ToString()); sb.Append("</span>"); sb.Append("<span>"); sb.Append(row["Type"].ToString()); sb.Append("</span>"); sb.Append("<span>"); sb.Append("<a href=\"javascript:associatedPartyAction('Delete','" + row["RelationshipId"].ToString() + "', '')\">Delete</a>"); sb.Append("</span>"); sb.Append("</li>"); sb.Append("\n"); } sb.Append("</OL>"); return(sb.ToString()); }
public static string GetAssociations(string childId) { DataTable dt = new LoadControlsDao().GetAssociations(childId); StringBuilder sb = new StringBuilder(); sb.Append("<OL>"); foreach (DataRow row in dt.Rows) { sb.Append("<li>"); sb.Append("<span>"); sb.Append(row["Firstname"].ToString() + " " + row["lastname"].ToString()); sb.Append("</span>"); sb.Append("<span>"); sb.Append(row["Type"].ToString()); sb.Append("</span>"); sb.Append("<span>"); sb.Append("<a href=\"javascript:associatedPartyAction('Delete','" + row["RelationshipId"].ToString() + "', '')\">Delete</a>"); sb.Append("</span>"); sb.Append("</li>"); sb.Append("\n"); } sb.Append("</OL>"); return sb.ToString() ; }
public static string GetChildContent(string ChildId) { DataTable dt = new LoadControlsDao().GetEventDetails(ChildId); StringBuilder sb = new StringBuilder(); sb.Append("<OL>"); foreach (DataRow row in dt.Rows) { sb.Append("<li>"); sb.Append("<H1>" + row["EventTitle"].ToString() + "</H1>"); sb.Append("<H2>"); sb.Append("<span>" + row["EventDate"].ToString() + "</span>"); sb.Append("<span>" + row["Description"].ToString() + "</span>"); sb.Append("</H2>"); sb.Append("<hr/>"); //get content for this event. DataTable dtContent = new LoadControlsDao().GetChildContent(ChildId, row["Id"].ToString()); if (dtContent.Rows.Count != 0) { sb.Append("<OL>"); foreach (DataRow contentRow in dtContent.Rows) { string filepath = contentRow["Location"].ToString(); filepath = "/" + filepath.Substring(filepath.IndexOf(ChildId)); filepath.Replace(@"\", "/"); string host = string.Empty; if (HttpContext.Current.Request.ApplicationPath == "/") { host = "http://" + HttpContext.Current.Request.Url.Host; } else { host = "http://" + HttpContext.Current.Request.Url.Host + HttpContext.Current.Request.ApplicationPath; } filepath = host + filepath; sb.Append("<LI>"); sb.Append("<span>" + contentRow["Type"].ToString() + "</span>"); sb.Append("<span><a href=\"" + filepath + "\")>View</a></span>"); sb.Append("</LI>"); } sb.Append("</OL>"); } sb.Append("<hr/>"); sb.Append("</LI>"); } sb.Append("</OL>"); return(sb.ToString()); }
public static string GetChildContent(string ChildId) { DataTable dt = new LoadControlsDao().GetEventDetails(ChildId); StringBuilder sb = new StringBuilder(); sb.Append("<OL>"); foreach (DataRow row in dt.Rows) { sb.Append("<li>"); sb.Append("<H1>" + row["EventTitle"].ToString() + "</H1>"); sb.Append("<H2>"); sb.Append("<span>" + row["EventDate"].ToString() + "</span>"); sb.Append("<span>" + row["Description"].ToString() + "</span>"); sb.Append("</H2>"); sb.Append("<hr/>"); //get content for this event. DataTable dtContent = new LoadControlsDao().GetChildContent(ChildId, row["Id"].ToString()); if (dtContent.Rows.Count != 0) { sb.Append("<OL>"); foreach (DataRow contentRow in dtContent.Rows) { string filepath = contentRow["Location"].ToString(); filepath = "/" + filepath.Substring(filepath.IndexOf(ChildId)); filepath.Replace(@"\", "/"); string host = string.Empty; if (HttpContext.Current.Request.ApplicationPath == "/") host = "http://" + HttpContext.Current.Request.Url.Host; else host = "http://" + HttpContext.Current.Request.Url.Host + HttpContext.Current.Request.ApplicationPath; filepath = host + filepath; sb.Append("<LI>"); sb.Append("<span>" + contentRow["Type"].ToString() + "</span>"); sb.Append("<span><a href=\"" + filepath + "\")>View</a></span>"); sb.Append("</LI>"); } sb.Append("</OL>"); } sb.Append("<hr/>"); sb.Append("</LI>"); } sb.Append("</OL>"); return sb.ToString(); }
public static List <ListItem> GetRelationships() { LoadControlsDao dao = new LoadControlsDao(); return(dao.GetRelationships()); }
public static List<ListItem> GetRelationships() { LoadControlsDao dao = new LoadControlsDao(); return dao.GetRelationships(); }