コード例 #1
0
        private void InitiUserInfo(string strUsername)
        {
            string strAppName = System.Configuration.ConfigurationManager.AppSettings["APP_NAME"].ToString().Trim();
            try
            {
                XmlDocument xmlUserInfo = new XmlDocument();
                userInfo CuruserInfo = new userInfo();
                CuruserInfo.StrLogin_name = strUsername;
                string strReal_Name = UI.RealName;
                string strIDCode = UI.IDNO;
                strIDCode = strIDCode.Trim().Substring(1);
                string strCorp_Code = UI.OrgID;
                string strType_ID = xmlUserInfo.SelectSingleNode("/app_root/ORG/CORP_TYPE_ID").InnerText;
                string strCorp_Type = LoginDB.GetCorp_Type_Name(strType_ID);
                if (strCorp_Type.Trim() == ConfigurationManager.AppSettings["ENTNAME"])
                {
                    CuruserInfo.StrCompany = strCorp_Code;
                    DataTable tab = LoginDB.GetUser_Info(strIDCode);
                    if (tab.Rows.Count > 0)
                    {

                        CuruserInfo.StrCorp_name = tab.Rows[0]["CORP_NAME"].ToString().Trim();
                        CuruserInfo.StrUser = tab.Rows[0]["DEC_NAME"].ToString().Trim();
                        CuruserInfo.StrIdentCard = strIDCode;
                        CuruserInfo.StrPhone = tab.Rows[0]["DEC_PHONE"].ToString().Trim();
                        CuruserInfo.StrCertCode = tab.Rows[0]["DEC_CERT"].ToString().Trim();
                        CuruserInfo.StrDec_ID = tab.Rows[0]["DEC_ID"].ToString().Trim();
                    }
                    else
                    {
                        CuruserInfo.StrCorp_name = LoginDB.GetCorp_Name(" SELECT CORP_NAME FROM ZJGDOU_CORP WHERE CORP_CODE='" + strCorp_Code + "'");
                        CuruserInfo.StrUser = strReal_Name;
                        if (CuruserInfo.StrCorp_name.Trim() == "")
                        {
                            CuruserInfo.StrCorp_name = LoginDB.GetAgent_Name(strCorp_Code);
                        }
                    }

                }
                else
                {
                    CuruserInfo.StrUser = strReal_Name;
                }
                XmlElement xmlRightList = (XmlElement)xmlUserInfo.SelectSingleNode("/app_root/ROLE");
                string strRightList = xmlRightList.GetAttribute("funcCollection");
                CuruserInfo.StrRightList = strRightList;
                string[] strRight = strRightList.Trim().Split(',');
                Hashtable hasRight = new Hashtable();
                for (int i = 0; i < strRight.Length; i++)
                {
                    hasRight[strRight[i]] = "1";
                }
                CuruserInfo.UserRight = hasRight;
                Session["USERINFO"] = CuruserInfo;
            }
            catch (Exception err)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('初始化用户信息出错,请重新登录');window.navigate('../../login.aspx')</script>");
            }
        }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     CurrUser = new userInfo();
     if (!IsPostBack)
     {
         InitiData();
     }
 }
コード例 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     CurrUser = new userInfo();
     if (!IsPostBack)
     {
         refreshGrid();
     }
 }
コード例 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     CurrUser = new userInfo();
     if (!IsPostBack)
     {
         if (this.Request.QueryString["id"] != null)
         {
             InitData();
         }
     }
 }
コード例 #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     CurrUser = new userInfo();
     if (!IsPostBack)
     {
         this.lblDec_Name.Text = CurrUser.StrUser;
         this.lblDec_Code.Text = CurrUser.StrCertCode;
         this.lblDec_Phone.Text = CurrUser.StrPhone;
         InitDropDown();
         InitiData();
     }
 }
コード例 #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     CurrUser = new userInfo();
     if (CurrUser.StrDec_ID == "")
     {
         this.CallJsFun("alert('对不起,您不是本系统注册的申报员,没有操作本功能的权限!!');window.location.href ='../../ZJGDOU_WelCome.aspx';");
         return;
     }
     if (!IsPostBack)
     {
         refreshGrid();
     }
 }
コード例 #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //if (Session["IsCAW"] != "Y")
     //{
     //    this.CallJsFun("javascript:alert('对不起,你没有这个权限!请联系管理员!');window.location.href ='../../ZJGDOU_WelCome.aspx';");
     //    return;
     //}
     CurrUser = new userInfo();
     if (!IsPostBack)
     {
         InitDropDownList();
         refreshGrid();
     }
 }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (Session["IsCAW"].ToString() != "Y")
            //{
            //    this.CallJsFun("javascript:alert('对不起,你没有这个权限!请联系管理员!');window.location.href ='../../ZJGDOU_WelCome.aspx';");
            //    return;
            //}
            CurrUser = new userInfo();
            if (CurrUser.StrCorp_name == "")
            {
                this.CallJsFun("alert('对不起,您所属的企业还没有在本系统中注册,没有操作本功能的权限!!');window.navigate('../../ZJGDOU_WelCome.aspx');");
                return;
            }

            if (!IsPostBack)
            {
                refreshGrid();
            }
        }
コード例 #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     CurrUser = new userInfo();
     this.btnPass.Attributes.Add("Onclick", "Javascript:return confirm('您确认要通过该笔申报吗?');");
     this.btnReject.Attributes.Add("Onclick", "Javascript:return confirm('您确认要否决回退该笔申报吗?');");
     if (!IsPostBack)
     {
         InitData();
     }
 }
コード例 #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     CurrUser = new userInfo();
     if (!IsPostBack)
     {
         ViewState["CorpCode"] = CurrUser.StrCompany;
         InitiDropDown();
         if (Request.QueryString["id"] != null)
         {
             InitiData();
         }
         if (Request.QueryString["type"] == "0")
         {
             this.mod.Visible = false;
         }
         if (Request.QueryString["type"] == "2")
         {
             this.btnSave.Visible = false;
         }
     }
 }
コード例 #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CurrUser = new userInfo();
            if (CurrUser.StrCorp_name == "")
            {
                this.CallJsFun("alert('对不起,您所属的企业还没有在本系统中注册,没有操作本功能的权限!!');window.navigate('../../ZJGDOU_WelCome.aspx');");
                return;
            }

            if (!IsPostBack)
            {
                refreshGrid();
            }
        }
コード例 #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     CurrUser = new userInfo();
     if (!IsPostBack)
     {
         if (Request.QueryString["type"] == "1")
         {
             ShowLable();
             InitiData();
         }
         else
         {
             InitiDropDown();
         }
     }
 }