Web/JobShow.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace cosmos.Web
{
public partial class JobShow : System.Web.UI.Page
{
protected string lblName;
protected string lblCount;
protected string lblPubtime;
protected string lblZhize;
protected string lblYaoqiu;
protected string lblSlary;
protected int Id; //全局变量Id
protected cosmos.Model.JobInfo model = new cosmos.Model.JobInfo();
protected void Page_Load(object sender, EventArgs e)
{
if (!int.TryParse(Request.Params["id"] as string, out this.Id))
{
Response.Write("<script>alert('您要查看的信息参数不正确或不存在!'),location.href='Job.aspx';</script>");
return;
}
cosmos.BLL.JobInfo bll = new cosmos.BLL.JobInfo();
model = bll.GetModel(this.Id);//获得Id
//浏览数+1
bll.UpdateField(this.Id, "Hits=Hits+1");
if (!Page.IsPostBack)
{
//赋值
ShowInfo(Id);
}
}
//赋值
private void ShowInfo(int Id)
{
cosmos.BLL.JobInfo bll = new cosmos.BLL.JobInfo();
cosmos.Model.JobInfo model = bll.GetModel(Id);
lblName = model.JName;
lblCount = model.JSum;
lblPubtime =Convert.ToString(string.Format("{0:g}",model.PubTime));
lblZhize = model.JAddress;
lblYaoqiu =cosmos.Common.Utils.ToTxt( model.JRequire);
lblSlary = cosmos.Common.Utils.ToTxt(model.JWage);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。