예제 #1
0
 private void GetCateInfo()
 {
     if (Session["dataByTitle_Cate"] != null)
     {
         DataTable dt = (DataTable)Session["dataByTitle_Cate"];
         if (dt.Rows.Count > 0)
         {
             ltrCateName.Text = dt.Rows[0][GroupsColumns.VgName].ToString();
             ltrCateDesc.Text = dt.Rows[0][GroupsColumns.VgDesc].ToString();
         }
     }
     else
     {
         string condition = DataExtension.AndConditon(
             GroupsTSql.GetByApp(app),
             GroupsTSql.GetByEnable("1"),
             GroupsTSql.GetByLang(lang),
             GroupsTSql.GetByParentId("0")
             );
         string    fields  = DataExtension.GetListColumns(GroupsColumns.VgName, GroupsColumns.VgDesc);
         string    orderby = GroupsColumns.DgCreateDate + " desc";
         DataTable dt      = Groups.GetGroups("1", fields, condition, orderby);
         if (dt.Rows.Count > 0)
         {
             ltrCateName.Text = dt.Rows[0][GroupsColumns.VgName].ToString();
             ltrCateDesc.Text = dt.Rows[0][GroupsColumns.VgDesc].ToString();
         }
     }
 }
예제 #2
0
    private string GetCateInfo()
    {
        string s = "";

        if (Session["dataByTitle_Cate"] != null)
        {
            DataTable dt = (DataTable)Session["dataByTitle_Cate"];
            if (dt.Rows.Count > 0)
            {
                s += @"
        <div class='banner tour'>
          <div class='body'>
            <h1>
              <a href='#' class='title fSize-42 fSize-md-30 fSize-sm-26 txtCenter'>
                <span>" + (page == "d" ? "" : dt.Rows[0][GroupsColumns.VgName].ToString()) + @"</span>
              </a>
            </h1>
            <p class='text  txtCenter nb-color-m0'>" + (page == "d" ? "" : dt.Rows[0][GroupsColumns.VgDesc].ToString()) + @"</p>
          </div>
        </div>";
            }
        }
        else
        {
            string condition = DataExtension.AndConditon(
                GroupsTSql.GetByApp(app),
                GroupsTSql.GetByEnable("1"),
                GroupsTSql.GetByLang(lang),
                GroupsTSql.GetByParentId("0")
                );
            string    fields  = DataExtension.GetListColumns(GroupsColumns.VgName, GroupsColumns.VgDesc);
            string    orderby = GroupsColumns.DgCreateDate + " desc";
            DataTable dt      = Groups.GetGroups("1", fields, condition, orderby);
            if (dt.Rows.Count > 0)
            {
                s += @"
        <div class='banner tour'>
          <div class='body'>
            <h1>
              <a href='#' class='title fSize-42 fSize-md-30 fSize-sm-26 txtCenter'>
                <span>" + (page == "d" ? "" : dt.Rows[0][GroupsColumns.VgName].ToString()) + @"</span>
              </a>
            </h1>
            <p class='text  txtCenter nb-color-m0'>" + (page == "d" ? "" : dt.Rows[0][GroupsColumns.VgDesc].ToString()) + @"</p>
          </div>
        </div>";
            }
        }

        return(s);
    }