📄 guestviewunitlist.aspx.cs
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace Job111
{
/// <summary>
/// GuestViewUnitList 的摘要说明。
/// </summary>
public class GuestViewUnitList : System.Web.UI.Page
{
private JobFairService.JobFairService jobSer= new Job111.JobFairService.JobFairService();
private WebReference.WebWatch webSer = new Job111.WebReference.WebWatch();
private int MeetID=0;
protected System.Web.UI.WebControls.DataGrid dgdInterviewQue;
protected System.Web.UI.WebControls.DataGrid Datagrid1;
protected System.Web.UI.HtmlControls.HtmlForm Form2;
protected System.Web.UI.HtmlControls.HtmlForm Form1;
protected System.Web.UI.WebControls.Button Button1;
protected System.Web.UI.WebControls.Button Button2;
protected string str = "111";
private void Page_Load(object sender, System.EventArgs e)
{
ViewUnitList();
}
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Button2.Click += new System.EventHandler(this.Button2_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void ViewUnitList()
{
MeetID = int.Parse(Request.QueryString["MeetID"].ToString().Trim());
DataSet ds = jobSer.ViewJobFairList(MeetID);
if (ds==null)
{
JavaScript.ShowMessageBox(this,"该供需会内现在没有任何单位");
return;
}
dgdInterviewQue.DataSource=ds.Tables[0];
dgdInterviewQue.DataBind();
}
protected string GetStateText(object OnLineID)
{
//DataSet ds = jobSer.AllUnit();
int id = int.Parse(OnLineID.ToString());
if (webSer.UserIsOnline(id))
{
return "在线";
}
return "不在线";
}
private void dgdInterviewQue_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
dgdInterviewQue.CurrentPageIndex = e.NewPageIndex;
ViewUnitList();
}
protected string GetUrl1(object note, object onlineid)
{
int noteType = 0;
try
{
noteType = int.Parse(note.ToString().Trim());
}
catch
{
noteType = 0;
}
if (noteType==1|| noteType==3)
{
string url1 = "CancelShortMsg.aspx?unitid=" + onlineid.ToString().Trim() + "&type=1" ;
return "已订阅(" + "<a href=\""+url1+"\" target=\"job\">取消</a>)";
}
string url = "TakeShortMsg.aspx?unitid=" + onlineid.ToString().Trim() + "&type=1";
string link="<a href=\""+url+"\" target=\"job\">订阅</a>";
return link;
}
protected string GetUrl2(object note, object onlineid)
{
int noteType = 0;
try
{
noteType = int.Parse(note.ToString().Trim());
}
catch
{
noteType = 0;
}
if (noteType==2|| noteType==3)
{
string url1 = "CancelShortMsg.aspx?unitid=" + onlineid.ToString().Trim() + "&type=2";
return "已订阅(" + "<a href=\""+url1+"\" target=\"job\">取消</a>)";
}
string url = "TakeShortMsg.aspx?unitid="+ onlineid.ToString().Trim() + "&type=2";
string link="<a href=\""+url+"\" target=\"job\">订阅</a>";
return link;
}
private void Button1_Click(object sender, System.EventArgs e)
{
JavaScript.ShowMessageBox(this, "暂时未开通此功能!");
}
private void Button2_Click(object sender, System.EventArgs e)
{
JavaScript.ShowMessageBox(this, "暂时未开通此功能!");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -