📄 bindonlineid.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>
/// BindOnLineID 的摘要说明。
/// </summary>
public class BindOnLineID : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button Button3;
protected System.Web.UI.WebControls.Button Button4;
protected System.Web.UI.WebControls.RadioButton RadioButton1;
protected System.Web.UI.WebControls.TextBox txtPassword;
protected System.Web.UI.WebControls.Label Label4;
protected JobFairService.JobFairService js = new Job111.JobFairService.JobFairService();
private int OnLineID = 0;
private int JobFairID = 0;
private int UnitID = 0;
string UnitName = "";
string Password = "";
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.RadioButton RadioButton2;
protected System.Web.UI.WebControls.TextBox TxtUserID;
int MsgFlag = 1;
private void Page_Load(object sender, System.EventArgs e)
{
// this.RadioButton2.Checked = true;
}
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Button4.Click += new System.EventHandler(this.Button4_Click);
this.Button3.Click += new System.EventHandler(this.Button3_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void Button3_Click(object sender, System.EventArgs e)
{
JavaScript.CloseWindow(this);
}
protected string GetLogo()
{
int unitID = new State(this).WatchUnitID;
string logoPath = "";
string fileName = "";
string depart = new State(this).DepartName;
try
{
if (depart == "本单位"|| depart == "")
{
fileName = new WebReference.WebWatch().GetLogoName(unitID);
}
else
{
fileName = new WebReference.WebWatch().GetLogoName1(unitID);
}
}
catch
{
fileName = "";
}
if (fileName != "")
{
logoPath = @"userspic/" + fileName;
}
else
{
logoPath = @"userspic/zxfk_02.gif";
}
return logoPath;
}
private void Button4_Click(object sender, System.EventArgs e)
{
if (TxtUserID.Text.Trim() == "")
{
JavaScript.ShowMessageBox(this, "请输入在线视频号!");
return;
}
else
{
try
{
OnLineID = Int32.Parse(TxtUserID.Text);
}
catch
{
JavaScript.ShowMessageBox(this, "在线视频号应输入数字!");
return;
}
}
if (txtPassword.Text.Trim() == "")
{
JavaScript.ShowMessageBox(this, "请输入密码!");
return;
}
else
{
Password = txtPassword.Text;
}
bool flag = false;
try
{
flag = js.IsOnLineID(OnLineID,Password);
}
catch
{
flag = false;
}
if (!flag)
{
JavaScript.ShowMessageBox(this, "请输入正确的在线视频号及密码!");
return;
}
if (RadioButton2.Checked == true)
{
MsgFlag = 1;
}
if (RadioButton1.Checked == true)
{
MsgFlag = 0;
}
JobFairID = new State(this).JobFairID;
UnitID = new State(this).JobUnitID;
UnitName = new State(this).UnitName;
int i = 0;
try
{
i = js.AddUnitInfo(OnLineID,JobFairID,UnitID,UnitName,MsgFlag);
}
catch
{
i = 0;
}
if (i == 1)
{
new State(this).OnLineID = OnLineID;
Response.Write("<script language = javascript>location='UnitViewMeet.aspx'</script>");
}
else if (i == 0)
{
JavaScript.ShowMessageBox(this, "绑定在线视频号失败,请重试!");
new State(this).OnLineID = 0;
JavaScript.CloseWindow(this);
}
else
{
JavaScript.ShowMessageBox(this, "绑定在线视频号失败,请稍候再试!");
new State(this).OnLineID = 0;
JavaScript.CloseWindow(this);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -