Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        modWebSite = OperateHelper.GetWebSite(int.Parse(PageCommon.LanguageID));

        Bll_Link BLink    = new Bll_Link();
        string   strWhere = string.Format(" Model='{0}' and State=1 and WebSiteID={1} ", "QTLJ", PageCommon.LanguageID);
        string   txtOrder = " IsTop Desc, OrderBy Desc, AddDate ASC ";

        AdbannerList = BLink.GetModelList(int.MaxValue, strWhere, txtOrder);
    }
Exemplo n.º 2
0
    public static void SetWebSiteBrowseNum(int WebSiteID)
    {
        Bll_AdminWebSite BAdmin_WebSite = new Bll_AdminWebSite();

        if (WebSiteID != 0 && GetCookie(WebSiteID.ToString(), "WebSiteBrowse") == 0)
        {
            Mod_AdminWebSite MAdmin_WebSite = BAdmin_WebSite.GetModel(WebSiteID);
            if (MAdmin_WebSite != null)
            {
                MAdmin_WebSite.Attr5 = (MAdmin_WebSite.Attr5 + 1);
                BAdmin_WebSite.Update(MAdmin_WebSite);
                SetCookie(WebSiteID.ToString(), "1", "WebSiteBrowse");
            }
        }
    }
Exemplo n.º 3
0
    /// <summary>
    /// 获取网站配置
    /// </summary>
    /// <param name="WebSiteID">网站配置id</param>
    /// <returns>Mod_WebSite</returns>
    public static Mod_AdminWebSite GetWebSite(int WebSiteID)
    {
        Bll_AdminWebSite BAdmin_WebSite = new Bll_AdminWebSite();
        Mod_AdminWebSite MAdmin_WebSite = new Mod_AdminWebSite();

        MAdmin_WebSite = BAdmin_WebSite.GetModel(WebSiteID);
        if (MAdmin_WebSite != null)
        {
            return(MAdmin_WebSite);
        }
        else
        {
            return(new Mod_AdminWebSite());
        }
    }
Exemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        modWebSite = OperateHelper.GetWebSite(int.Parse(PageCommon.LanguageID));

        TypeId = DNTRequest.GetQueryInt("TypeId", 10147);

        ModelBaseType = PageCommon.GetModelType(TypeId);

        string ObjIDPath = ModelBaseType.IDPath;

        TopNavigation1.ObjIDPath = ObjIDPath;
        MBaseType        = PageCommon.GetModelType(int.Parse(ObjIDPath.Split(',')[0].ToString()));
        ucLeft1.TypeId   = ObjIDPath.Split(',')[1].ToString();
        ucLeft1.ParentId = ObjIDPath.Split(',')[0].ToString();

        _ucheader1.ParentID = ObjIDPath.Split(',')[0].ToString();



        string strWhere = "WebSiteID=" + PageCommon.LanguageID + " and State='1' and  IDPath like '%" + TypeId + "%'";

        ModelList = BInformation.GetModelList(int.MaxValue, strWhere + " ORDER BY OrderBy desc,AddDate desc");

        foreach (var item in ModelList)
        {
            trackPoints += "new google.maps.LatLng(" + item.Author + ")";


            trackAddress += "\"" + item.Title + "\"";
            if ((ModelList.IndexOf(item) + 1) != ModelList.Count)
            {
                trackAddress += ",";
                trackPoints  += ",";
            }
            if (ModelList.IndexOf(item) == 0)
            {
                myOptions = item.Author;
            }
        }


        Bll_Link BLink = new Bll_Link();

        strWhere = string.Format(" Model='{0}' and State=1 and WebSiteID={1} ", "QTLJ", PageCommon.LanguageID);
        string txtOrder = " IsTop Desc, OrderBy Desc, AddDate ASC ";

        AdbannerList = BLink.GetModelList(int.MaxValue, strWhere, txtOrder);
    }
Exemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        modWebSite      = OperateHelper.GetWebSite(int.Parse(PageCommon.LanguageID));
        this.Page.Title = modWebSite.Title;
        AddMetaTag("keywords", modWebSite.Keywords);
        AddMetaTag("description", modWebSite.Description);

        Bll_Link BLink    = new Bll_Link();
        string   strWhere = string.Format(" Model='{0}' and State=1 and WebSiteID={1} ", "LINK", PageCommon.LanguageID);
        string   txtOrder = " IsTop Desc, OrderBy Desc, AddDate ASC ";

        AdbannerList = BLink.GetModelList(int.MaxValue, strWhere, txtOrder);


        strWhere      = "  WebSiteID=" + PageCommon.LanguageID + " and State='1'  and TypeID=10147";
        ModelListLXWM = GetInfo.GetModelList(int.MaxValue, strWhere + " ORDER BY OrderBy desc,AddDate DESC");
    }
Exemplo n.º 6
0
    private void Bind()
    {
        Mod_AdminWebSite dto = new Mod_AdminWebSite();

        dto = BAdmin_WebSite.GetModel(AdminManage.WebSiteID);
        if (dto != null)
        {
            rblWebState.SelectedValue = dto.WebState.ToString();

            txtCloseInfo.Text   = dto.CloseInfo;
            txtWebName.Text     = dto.WebName;
            txtTitle.Text       = dto.Title;
            txtKeywords.Text    = dto.Keywords;
            txtDescription.Text = dto.Description;
            txtEmailSmtp.Text   = dto.EmailSmtp;
            txtEmailName.Text   = dto.EmailName;
            txtEmailPwd.Text    = dto.EmailPwd;
            txtCopyright.Text   = dto.Copyright;

            txtAttr1.Text = dto.Attr1;
            txtAttr2.Text = dto.Attr2;
            txtAttr3.Text = dto.Attr3;

            txtAttr4.Text    = dto.Attr4;
            txtWebUrl.Text   = dto.WebUrl;
            txtHomePage.Text = dto.HomePage;
            txtAttr9.Text    = dto.Attr9;

            txtReceiveEmail.Text = dto.ReceiveEmail;


            rblIsIntegral.SelectedValue = dto.IsIntegral.ToString();
            txtIntegralConversion.Text  = Convert.ToInt32(dto.IntegralConversion).ToString();
        }
        else
        {
            MessageBox.ShowRedirect(this, "信息已删除或不存在!", "Column/Default/Index.aspx");
        }
    }
Exemplo n.º 7
0
    protected void btnEdit_Click(object sender, EventArgs e)
    {
        Mod_AdminWebSite dto = new Mod_AdminWebSite();

        dto = BAdmin_WebSite.GetModel(AdminManage.WebSiteID);
        if (dto != null)
        {
            dto.WebState    = int.Parse(rblWebState.SelectedValue);
            dto.CloseInfo   = txtCloseInfo.Text.Trim();
            dto.WebName     = txtWebName.Text.Trim();
            dto.Title       = txtTitle.Text.Trim();
            dto.Keywords    = txtKeywords.Text.Trim();
            dto.Description = txtDescription.Text.Trim();
            dto.EmailSmtp   = txtEmailSmtp.Text.Trim();
            dto.EmailName   = txtEmailName.Text.Trim();
            dto.EmailPwd    = txtEmailPwd.Text.Trim();
            dto.Copyright   = txtCopyright.Text.Trim();

            dto.IsIntegral         = int.Parse(rblIsIntegral.SelectedValue);
            dto.IntegralConversion = decimal.Parse(txtIntegralConversion.Text.Trim());

            dto.Attr1 = txtAttr1.Text;
            dto.Attr2 = txtAttr2.Text;
            dto.Attr3 = txtAttr3.Text;

            dto.Attr4    = txtAttr4.Text;
            dto.WebUrl   = txtWebUrl.Text;
            dto.HomePage = txtHomePage.Text;
            dto.Attr9    = txtAttr9.Text;

            dto.ReceiveEmail = txtReceiveEmail.Text;

            BAdmin_WebSite.Update(dto);

            MessageBox.ShowRedirect(this, "信息保存成功!");
        }
    }
Exemplo n.º 8
0
    protected void btnEdit_Click(object sender, EventArgs e)
    {
        string WhereStr = " WebSiteID=" + ddlWebSite.SelectedValue + " AND IsCopy=1 ";

        if (ddlWebSite.SelectedValue == ddlSite.SelectedValue)
        {
            MessageBox.ShowMsgAndRedirect(this, "目标站点与生成站点不能一样!", "/Manage_SW/Column/Admin_WebSite/Copyweb.aspx");
            return;
        }
        WebSite.BLL.Bll_AdminMenu bll_AdminMenu = new Bll_AdminMenu();
        if (bll_AdminMenu.Exists(string.Format("WebSiteID={0}", ddlSite.SelectedValue)))
        {
            MessageBox.ShowMsgAndRedirect(this, "生成站点已存在!", "/Manage_SW/Column/Admin_WebSite/Copyweb.aspx");
            return;
        }


        Bll_AdminWebSite BAdmin_WebSite = new Bll_AdminWebSite();
        Mod_AdminWebSite modWebSite     = BAdmin_WebSite.GetModel(int.Parse(ddlWebSite.SelectedValue));

        modWebSite.ID      = int.Parse(ddlSite.SelectedValue);
        modWebSite.State   = 1;
        modWebSite.WebName = ddlSite.SelectedItem.Text;
        BAdmin_WebSite.Update(modWebSite);


        DataSet ds = BAdmin_Menu.GetList(WhereStr);

        if (ds != null && ds.Tables.Count > 0)
        {
            DataTable dt = ds.Tables[0];
            GetTree(dt, 0, 0);

            List <String> SQLStringList = new List <string>();
            //分类表
            DataTable table_dt  = GetColumnList("SW_BaseType").Tables[0];
            string    strColumn = string.Empty;
            string    strSql    = string.Empty;
            for (int i = 1; i < table_dt.Rows.Count; i++)
            {
                strColumn += table_dt.Rows[i]["COLUMN_NAME"] + ",";
            }
            strColumn = strColumn.Substring(0, strColumn.Length - 1);

            strSql  = "insert  into SW_BaseType (" + strColumn + ") ";
            strSql += "select " + strColumn.Replace("WebSiteID", ddlSite.SelectedValue) + " from SW_BaseType where WebSiteID=" + ddlWebSite.SelectedValue;
            SQLStringList.Add(strSql);

            //新闻表
            table_dt  = GetColumnList("SW_Information").Tables[0];
            strColumn = string.Empty;
            strSql    = string.Empty;
            for (int i = 1; i < table_dt.Rows.Count; i++)
            {
                strColumn += table_dt.Rows[i]["COLUMN_NAME"] + ",";
            }
            strColumn = strColumn.Substring(0, strColumn.Length - 1);

            strSql  = "insert  into SW_Information (" + strColumn + ") ";
            strSql += "select " + strColumn.Replace("WebSiteID", ddlSite.SelectedValue) + " from SW_Information where WebSiteID=" + ddlWebSite.SelectedValue;
            SQLStringList.Add(strSql);

            //新闻相册表
            table_dt  = GetColumnList("SW_PicList").Tables[0];
            strColumn = string.Empty;
            strSql    = string.Empty;
            for (int i = 1; i < table_dt.Rows.Count; i++)
            {
                strColumn += table_dt.Rows[i]["COLUMN_NAME"] + ",";
            }
            strColumn = strColumn.Substring(0, strColumn.Length - 1);

            strSql  = "insert  into SW_PicList (" + strColumn + ") ";
            strSql += "select " + strColumn.Replace("WebSiteID", ddlSite.SelectedValue) + " from SW_PicList where WebSiteID=" + ddlWebSite.SelectedValue;
            SQLStringList.Add(strSql);

            //新闻属性表
            table_dt  = GetColumnList("SW_Attr").Tables[0];
            strColumn = string.Empty;
            strSql    = string.Empty;
            for (int i = 1; i < table_dt.Rows.Count; i++)
            {
                strColumn += table_dt.Rows[i]["COLUMN_NAME"] + ",";
            }
            strColumn = strColumn.Substring(0, strColumn.Length - 1);

            strSql  = "insert  into SW_Attr (" + strColumn + ") ";
            strSql += "select " + strColumn.Replace("WebSiteID", ddlSite.SelectedValue) + " from SW_Attr where WebSiteID=" + ddlWebSite.SelectedValue;
            SQLStringList.Add(strSql);

            //友情链接
            table_dt  = GetColumnList("SW_Link").Tables[0];
            strColumn = string.Empty;
            strSql    = string.Empty;
            for (int i = 1; i < table_dt.Rows.Count; i++)
            {
                strColumn += table_dt.Rows[i]["COLUMN_NAME"] + ",";
            }
            strColumn = strColumn.Substring(0, strColumn.Length - 1);

            strSql  = "insert  into SW_Link (" + strColumn + ") ";
            strSql += "select " + strColumn.Replace("WebSiteID", ddlSite.SelectedValue) + " from SW_Link where WebSiteID=" + ddlWebSite.SelectedValue;
            SQLStringList.Add(strSql);

            int rows = WebSite.DBUtility.DbHelperSQL.ExecuteSqlTran(SQLStringList);
            if (rows == 0)
            {
                MessageBox.ShowMsgAndRedirect(this, "数据生成失败!", "/Manage_SW/Column/Admin_WebSite/Copyweb.aspx");
                return;
            }
            else
            {
                MessageBox.ShowMsgAndRedirect(this, "数据生成成功!", "/Manage_SW/Column/Admin_WebSite/Copyweb.aspx");
                return;
            }
        }
    }