918博天堂

Server : Microsoft-IIS/10.0
System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586
User : jxgj ( 0)
PHP Version : 7.0.33
Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server
Directory :  D:/tmp_aspnet/root/d869865f/b8eead95/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : D:/tmp_aspnet/root/d869865f/b8eead95/App_Web_advertise_show.aspx.cdcab7d2.xgsujq7s.1.cs
?#pragma checksum "D:\wwwroot\szshengdayu\wwwroot\advertise_show.aspx.cs" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "15E007CAFD5D7C8A2327ADD23D8E7225"

#line 1 "D:\wwwroot\szshengdayu\wwwroot\advertise_show.aspx.cs"
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Bing.Common;
using Bing.BLL;
using Bing.Model;
using System.Collections.Generic;

public partial class advertise_show : System.Web.UI.Page
{
    #region 公共变量属性
    private string order = " order by OrderID asc, AddTime desc, id desc";//排序
    private string sql1                //绑定前提
    {
        get
        {
            string str = "";
            if (EditID > -1) { str = " id=" + EditID; }
            str = str + order;
            return str;
        }
    }

    public int EditID   //接管ID
    {
        get
        {
            string id = Request.QueryString["id"];
            if (string.IsNullOrEmpty(id)) return -1;
            int mangid;
            int.TryParse(id, out mangid);
            return mangid;
        }
    }
    public int EditKID   //接管ID
    {
        get
        {
            string id = Request.QueryString["kid"];
            if (string.IsNullOrEmpty(id)) return -1;
            int mangid;
            int.TryParse(id, out mangid);
            return mangid;
        }
    }

    #endregion

    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            NewsShow();
        }
    }

    protected string[] strs = new string[] { "", "", "", "", "", "", "", "","" };//8
    private void NewsShow()
    {
        DataTable dt = Bing.DBUtility.OleDbHelper.ExecuteDataTable("select Content,ContentEn,titleEn,title,Author,Hits,addtime from[Recruitment] where" + sql1);
        if (dt != null && dt.Rows.Count > 0)
        {
            Hitss(EditID);
           // strs[0] = dt.Rows[0]["ID"].ToString();
            strs[1] = UIPageBase.GetByLaguage(StringHelper.GetLeftStr(dt.Rows[0]["title"].ToString(), 20), dt.Rows[0]["titleEn"].ToString());
           
            strs[3] = dt.Rows[0]["Author"].ToString() == "" ? "不详" : dt.Rows[0]["Author"].ToString();
            strs[4] = Convert.ToDateTime(dt.Rows[0]["addtime"].ToString()).ToString("yyyy-MM-dd");
            strs[5] = UIPageBase.GetByLaguage(dt.Rows[0]["Content"].ToString(), dt.Rows[0]["ContentEn"].ToString());
            strs[6] = dt.Rows[0]["Hits"].ToString();
            Classtitle(EditID.ToString());
        }
    }

    private void Hitss(int id)
    {
      RecruitmentInfo NInfo = new RecruitmentBLL().GetModel(id);
        NInfo.Hits += 1;
        new RecruitmentBLL().Update(NInfo);
    }

    //返回类别标题
    protected string Titles = "";
    protected void Classtitle(string id)
    {

        IList<RecruitmentInfo> uplist = new RecruitmentBLL().GetList("1=1" + order + "");

        int up = 0;
        int down = 0;
        string upcont = "", downcont = "";
        for (int i = 0; i < uplist.Count; i++)
        {
            if (uplist[i].ID == Convert.ToInt32(id))
            {
                if (i != 0) { up = uplist[i - 1].ID; upcont = UIPageBase.GetByLaguage(uplist[i - 1].Title, uplist[i - 1].TitleEn); }
                if (i != uplist.Count - 1) { down = uplist[i + 1].ID; downcont = UIPageBase.GetByLaguage(uplist[i + 1].Title, uplist[i + 1].TitleEn); }
                i = uplist.Count;
            }
        }
        if (up == 0)
        {
           // lit_prv.Text = UIPageBase.GetByLaguage("上一个:没有了", "Last:No");
        }
        else
        {
            lit_prv.Text = "<a href='" + UIPageBase.GetUrlByLan("advertise_Show.aspx?id=" + up + "") + "'> " + UIPageBase.GetByLaguage("上一个:", "Last:") + "" + StringHelper.GetLeftStr(upcont, 15) + "</a>";
        }

        if (down == 0)
        {
           // lit_next.Text = UIPageBase.GetByLaguage("下一个:没有了", "Next:No");
        }
        else
        {
            lit_next.Text = "<a href='" + UIPageBase.GetUrlByLan("advertise_Show.aspx?id=" + down + "") + "'> " + UIPageBase.GetByLaguage("下一个:", "Next:") + "" + StringHelper.GetLeftStr(downcont, 15) + " </a>";
        }

    }
}


#line default
#line hidden