📄 state.cs
字号:
using System;
using System.Web.UI;
namespace Job111
{
/// <summary>
/// WatchRoom 的摘要说明。
/// </summary>
public class State
{
private Page p;
public State(Page CurrentPage)
{
p = CurrentPage;
}
public int UserID
{
set
{
if(p.Session["UserID"] == null)
{
p.Session.Add("UserID", value);
}
else
{
p.Session["UserID"] = value;
}
}
get
{
return (int)p.Session["UserID"];
}
}
public int QuitFlag
{
set
{
if (p.Session["QuitFlag"] == null)
{
p.Session.Add("QuitFlag",value);
}
else
{
p.Session["QuitFlag"] = value;
}
}
get
{
return (int)p.Session["QuitFlag"];
}
}
public void ClearQuitFlag()
{
p.Session.Remove("QuitFlag");
}
public int UnitPersonID
{
set
{
if (p.Session["UnitPersonID"] == null)
{
p.Session.Add("UnitPersonID",value);
}
else
{
p.Session["UnitPersonID"] = value;
}
}
get
{
return (int)p.Session["UnitPersonID"];
}
}
public void ClearUnitPersonID()
{
p.Session.Remove("UnitPersonID");
}
public void ClearUserID()
{
p.Session.Remove("UserID");
}
public int UnitID
{
set
{
if(p.Session["UnitID"] == null)
{
p.Session.Add("UnitID", value);
}
else
{
p.Session["UnitID"] = value;
}
}
get
{
if (p.Session["UnitID"] == null)
return 0;
return (int)p.Session["UnitID"];
}
}
public void ClearUnitID()
{
p.Session.Remove("UnitID");
}
public int WatchID
{
set
{
if(p.Session["WatchID"] == null)
{
p.Session.Add("WatchID", value);
}
else
{
p.Session["WatchID"] = value;
}
}
get
{
return (int)p.Session["WatchID"];
}
}
public void ClearWatchID()
{
p.Session.Remove("WatchID");
}
public int AskerID
{
set
{
if(p.Session["AskerID"] == null)
{
p.Session.Add("AskerID", value);
}
else
{
p.Session["AskerID"] = value;
}
}
get
{
return (int)p.Session["AskerID"];
}
}
public void ClearAskerID()
{
p.Session.Remove("AskerID");
}
public int WatchUnitID
{
set
{
if(p.Session["WatchUnitID"] == null)
{
p.Session.Add("WatchUnitID", value);
}
else
{
p.Session["WatchUnitID"] = value;
}
}
get
{
return (int)p.Session["WatchUnitID"];
}
}
public void ClearWatchUnitID()
{
p.Session.Remove("WatchUnitID");
}
public int AskerUnitID
{
set
{
if(p.Session["AskerUnitID"] == null)
{
p.Session.Add("AskerUnitID", value);
}
else
{
p.Session["AskerUnitID"] = value;
}
}
get
{
return (int)p.Session["AskerUnitID"];
}
}
//加入一个"DepartName"二级单位名。
//张磊2004.5.9修改
public string DepartName
{
set
{
if(p.Session["DepartName"] == null)
{
p.Session.Add("DepartName", value);
}
else
{
p.Session["DepartName"] = value;
}
}
get
{
return (string)p.Session["DepartName"];
}
}
public void ClearDepartName()
{
p.Session.Remove("DepartName");
}
public void ClearAskerUnitID()
{
p.Session.Remove("AskerUnitID");
}
/// <summary>
/// 过客访问时传入的姓名
/// </summary>
public string UserName
{
set
{
if(p.Session["UserName"] == null)
{
p.Session.Add("UserName", value);
}
else
{
p.Session["UserName"] = value;
}
}
get
{
return (string)p.Session["UserName"];
}
}
public void ClearUserName()
{
p.Session.Remove("UserName");
}
public int WebFlag
{
set
{
if (p.Session["WebFlag"] == null)
{
p.Session.Add("WebFlag",value);
}
else
{
p.Session["WebFlag"] = value;
}
}
get
{
return (int)p.Session["WebFlag"];
}
}
public void ClearWebFlag()
{
p.Session.Remove("WebFlag");
}
public int JobFairID
{
set
{
if (p.Session["JobFairID"] == null)
{
p.Session.Add("JobFairID",value);
}
else
{
p.Session["JobFairID"] = value;
}
}
get
{
return (int)p.Session["JobFairID"];
}
}
public void ClearJobFairID()
{
p.Session.Remove("JobFairID");
}
public int OnLineID
{
set
{
if (p.Session["OnLineID"] == null)
{
p.Session.Add("OnLineID",value);
}
else
{
p.Session["OnLineId"] = value;
}
}
get
{
return (int)p.Session["OnLineID"];
}
}
public void ClearOnLineID()
{
p.Session.Remove("OnLineID");
}
public string UnitName
{
set
{
if (p.Session["UnitName"] == null)
{
p.Session.Add("UnitName",value);
}
else
{
p.Session["UnitName"] = value;
}
}
get
{
return (string)p.Session["UnitName"];
}
}
public void ClearUnitName()
{
p.Session.Remove("UnitName");
}
public string JobSeekerName
{
set
{
if (p.Session["JobSeekerName"] == null)
{
p.Session.Add("JobSeekerName",value);
}
else
{
p.Session["JobSeekerName"] = value;
}
}
get
{
return (string)p.Session["JobSeekerName"];
}
}
public void ClearJobSeekerName()
{
p.Session.Remove("JobSeekerName");
}
public int JobSeekerID
{
set
{
if (p.Session["JobSeekerID"] == null)
{
p.Session.Add("JobSeekerID",value);
}
else
{
p.Session["JobSeekerID"] = value;
}
}
get
{
return (int)p.Session["JobSeekerID"];
}
}
public void ClearJobSeekerID()
{
p.Session.Remove("JobSeekerID");
}
public int JobUnitID
{
set
{
if (p.Session["JobUnitID"] == null)
{
p.Session.Add("JobUnitID",value);
}
else
{
p.Session["JobUnitID"] = value;
}
}
get
{
return (int)p.Session["JobUnitID"];
}
}
public void ClearJobUnitID()
{
p.Session.Remove("JobUnitID");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -