LeftMenu.aspx.cs
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:5k
- using System;
- using System.Data;
- using System.Data.SqlClient;
- using System.Configuration;
- using System.Text;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- using com.etong.BusinessRule.Zwf;
- using com.etong.Utility;
- using com.etong.DAL;
- using com.etong.Inform;
- using com.etong.DAL.FC;
- public partial class LeftMenu : System.Web.UI.Page
- {
- RoleManage rm = new RoleManage();
- protected int orgid()
- {
- EtongZwf etongzwf = new EtongZwf();
- CheckUserInfo cuinfo = (CheckUserInfo)Session["checkuserinfo"];
- int orgid= etongzwf.GetOrgID(cuinfo.UserID);
- return orgid;
-
- }
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- CheckUserInfo cui = (CheckUserInfo)Session["checkuserinfo"];
- if (!this.Page.IsPostBack)
- {
- int pageid = Convert.ToInt32(Request.QueryString["id"].ToString().Trim());
- if (pageid != 2)
- {
- this.DL_Detail.DataSource = rm.GetUserPerissionList(cui.UserID, cui.UserAccount, pageid);
- this.DL_Detail.DataBind();
- }
- else
- {
- if (cui.UserAccount == "admin" || cui.UserAccount == "Admin")
- {
- this.DL_Detail.DataSource = null;
- this.DL_Detail.DataBind();
- }
- else
- {
- EtongFlyChouWFPrj EFlyPrj = new EtongFlyChouWFPrj();
- EFlyPrj.DeptID = cui.OrgID;
- EFlyPrj.EmpID = cui.EmpID;
- try
- {
-
- this.DL_Detail.DataSource = EFlyPrj.PrjGetPermission();
- this.DL_Detail.DataBind();
- }
- catch (Exception ex)
- {
- this.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + ex.Message.Replace("'", "").Replace("rn", "").Replace("n", "") + "');</script>");
- }
- //EtongZwf etongzwf = new EtongZwf();
- //this.DL_Detail.DataSource = etongzwf.GetWFPerissionList();
- //this.DL_Detail.DataBind();
- }
- }
- }
- }
- }
- //protected void DL_Detail_ItemDataBound(object sender, DataListItemEventArgs e)
- //{
- // if ((e.Item.ItemType == ListItemType.Item) ||(e.Item.ItemType == ListItemType.AlternatingItem))
- // {
- // if (!IsPostBack)
- // {
- // string PermID = Convert.ToString(DataBinder.Eval(e.Item.DataItem, "PermID"));
-
- // int pageid = Convert.ToInt32(Request.QueryString["id"].ToString().Trim());
- // try
- // {
- // if (pageid == 2)
- // {
- // CheckUserInfo cuinfo = (CheckUserInfo)Session["checkuserinfo"];
- // EtongZwf etongzwf = new EtongZwf();
- // string OrgcID = etongzwf.GetOrgcID(cuinfo.UserID);
- // //组织机构类型(a、公司领导c、基层部门b、职能部门1、其它)
- // if (OrgcID == "c") //注:此处不包括 "部门主管"
- // {
- // if (PermID == "8") //待办工作流
- // {
- // e.Item.Controls.Clear(); //吐了好几次
- // ClientScript.RegisterStartupScript(this.GetType(), "", "<script> top.mainFrame.location.href = 'Workflow/WorkFlowStart.aspx';</script>");
- // }
- // }
- // else if (OrgcID == "a" || OrgcID == "b")
- // {
- // if (PermID == "7") //启动工作流
- // {
- // e.Item.Controls.Clear();
- // ClientScript.RegisterStartupScript(this.GetType(), "", "<script> top.mainFrame.location.href = 'Workflow/WorkFlowWait.aspx';</script>");
- // }
- // }
- // }
- // }
- // catch
- // {
- // DL_Detail.Controls.Clear();
- // }
- // }
- // }
- //}
- }