本文整理汇总了C#中Voodoo.Basement.DataEntities.AddToViewHistory方法的典型用法代码示例。如果您正苦于以下问题:C# DataEntities.AddToViewHistory方法的具体用法?C# DataEntities.AddToViewHistory怎么用?C# DataEntities.AddToViewHistory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Voodoo.Basement.DataEntities
的用法示例。
在下文中一共展示了DataEntities.AddToViewHistory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadInfo
protected void LoadInfo()
{
id = WS.RequestLong("id");
if (id < 0)
{
return;
}
DataEntities ent = new DataEntities();
if (u.ID > 0)
{
ViewHistory his = new ViewHistory();
try
{
his = (from l in ent.ViewHistory where l.ItemID == id && l.UserID == u.ID && l.ModelID==5 select l).First();
}
catch
{ }
his.ViewTime = DateTime.Now;
his.ModelID = 5;
his.ItemID = id;
his.UserID = u.ID;
if (his.ID <= 0)
{
ent.AddToViewHistory(his);
}
ent.SaveChanges();
}
var j = (from l in ent.JobPost where l.ID == id select l).FirstOrDefault();
var c = (from l in ent.JobCompany where l.ID == j.CompanyID select l).FirstOrDefault();
Title=j.Title;
CompanyID = c.ID;
CompanyName=c.CompanyName;
PostTime=j.PostTime.ToDateTime().ToString("yyyy-MM-dd");
Province = JobAction.GetProviceName(j.Province.ToInt32());
City = JobAction.GetCityName(j.City.ToInt32());
Exp = JobAction.GetExpressionsName(j.Expressions.ToInt32());
Salary = JobAction.GetSalaryDegreeName(j.Salary.ToInt32());
Edu = j.GetPostEdu(); //JobAction.GetEduName(j.Edu.ToInt32());
EmpCount = j.GetPostEduAndNumber(); //j.EmployNumber == 0 ? "若干" : j.EmployNumber.ToS();
Intro = j.Intro;
CompIntro = c.Intro;
JobAction.AddCityHot(j.City.ToInt32());
RelaJobs = Functions.getpostlist("5",
"0",
string.Format("t.Title='{0}' and t.Id!={1}",j.Title,j.ID),
"t.id desc",
"<tr><td height=\"80\"style=\"border-bottom: 1px solid #eeeeee\"><table width=\"810\"align=\"center\"border=\"0\"cellspacing=\"0\"cellpadding=\"0\"><tr><td align=\"left\"><table width=\"680\"border=\"0\"cellspacing=\"0\"cellpadding=\"0\"align=\"left\"><tr><td align=\"left\"class=\"job_title\"><a href=\"Job.aspx?id={id}\">{title}</a></td></tr><tr><td align=\"left\"><table width=\"610\"border=\"0\"cellspacing=\"0\"cellpadding=\"0\"><tr><td align=\"left\"class=\"job_compangy\"><a href=\"Company.aspx?id={companyid}\">{companyname}</a></td><td align=\"left\"class=\"job_qt\">规模{employeecount}/学历{edu}/经验{expressions}</td><td align=\"left\"class=\"job_qt1\">月薪<span>{salary}</span></td></tr></table></td></tr></table></td><td width=\"100\"align=\"center\"style=\"line-height: 24px; color: #666666\"><input type=\"button\"onclick=\"post({id})\"value=\"一键投递\"style=\"background: url(/skin/job/img/td.gif) no-repeat; width: 60px;height: 22px; color: #FFFFFF; border: 0px;\"/><br/>{posttime}</td></tr></table></td></tr>");
}