SetRightType.aspx.cs
上传用户:autodoor
上传日期:2022-08-04
资源大小:9973k
文件大小:3k
- 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);
- }
- }
- }
- }