Exemplo n.º 1
0
        public static string LoadNewsItem(string url, string img, string n, string intro)
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append("<div class=\"item-news\">\n");
            stringBuilder.Append("    <div class=\"row\">\n");
            if (img.ToString() != "")
            {
                stringBuilder.Append("        <div class=\"col-md-4\">\n");
                stringBuilder.Append(string.Concat(new string[]
                {
                    "        <div class=\"img\"><a href=\"",
                    url,
                    "\" title=\"",
                    n,
                    "\"><img src=\"",
                    img,
                    "\" alt=\"",
                    n,
                    "\" class=\"img-thumbnail\" /></a></div>\n"
                }));
                stringBuilder.Append("        </div>\n");
            }
            stringBuilder.Append("        <div class=\"col-md-8\">\n");
            stringBuilder.Append("            <div class=\"detail\">\n");
            stringBuilder.Append(string.Concat(new string[]
            {
                "                <a href=\"",
                url,
                "\" title=\"",
                n,
                "\"><h2>",
                n,
                "</h2></a>\n"
            }));
            stringBuilder.Append("                <p>" + CMSfunc.CutString(CMSfunc.ClearHTMLTags(intro), 100) + "</p>");
            stringBuilder.Append(string.Concat(new string[]
            {
                "                <a href=\"",
                url,
                "\" title=\"",
                n,
                "\" class=\"btn btn-primary btn-sm\">",
                CMSfunc._Title("Detail"),
                "</a>\n"
            }));
            stringBuilder.Append("            </div>\n");
            stringBuilder.Append("        </div>\n");
            stringBuilder.Append("    </div>\n");
            stringBuilder.Append("</div>\n");
            return(stringBuilder.ToString());
        }
Exemplo n.º 2
0
 public static bool AddLog(string DepartmentID, string EmployeeID, string sManipulate, string sContent)
 {
     return(UpdateData.Insert("tbl_Log", new Hashtable
     {
         {
             "Log_DepartmentID",
             DepartmentID
         },
         {
             "Log_EmployeeID",
             EmployeeID
         },
         {
             "Log_Manipulate",
             sManipulate
         },
         {
             "Log_Content",
             CMSfunc.CutString(sContent, 50)
         }
     }));
 }