📄 setrighttype.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 qminoa.Webs.FM
{
public class SetRightType : System.Web.UI.Page
{
protected static int type;
protected static int fid;
protected System.Web.UI.WebControls.ImageButton cmdCancel;
protected System.Web.UI.WebControls.ImageButton cmdNext;
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.RadioButton radAccount;
protected System.Web.UI.WebControls.RadioButton radBranch;
protected int did;
private void Page_Load(object sender, System.EventArgs e)
{
if(!this.IsPostBack)
{
type=Convert.ToInt32(Request.QueryString["type"].ToString(),10);
if(type!=0)
{
Session["RightType"]=type;
if(Convert.ToInt32(Request.QueryString["fid"].ToString(),10)!=0)
{
fid=Convert.ToInt32(Request.QueryString["fid"].ToString(),10);
}
else
{
did=Convert.ToInt32(Request.QueryString["did"].ToString(),10);
//Session["_docid"]=did;
}
}
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.cmdNext.Click += new System.Web.UI.ImageClickEventHandler(this.cmdNext_Click);
this.cmdCancel.Click += new System.Web.UI.ImageClickEventHandler(this.cmdCancel_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void cmdNext_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
if(radBranch.Checked)
Response.Redirect("ShowBranch.aspx",false);
else if(radAccount.Checked)
Response.Redirect("ShowAccount.aspx",false);
}
private void cmdCancel_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
int righttype;
int fid;
int doc_id;
righttype=Convert.ToInt32(Session["RightType"]);
fid=Convert.ToInt32(Session["_folderId"]);
doc_id=Convert.ToInt32(Session["_docid"]);
if(righttype==4)
{
Response.Redirect("fmNewFolder.aspx?docid="+doc_id+"&id="+fid+"&type=-3",false);
}
else if(righttype==5)
{
Response.Redirect("fmNewFile.aspx?did="+doc_id+"&fid="+fid+"&type=-3",false);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -