Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            JuicDao dao    = new JuicDao("MENU");
            var     user   = dao.GetUser(this.User.Identity.Name.ToString());
            string  usname = user.Rows[0]["username"].ToString().Trim();



            if (!IsPostBack)
            {
                TextBox3.Text = usname;
                Label22.Text  = "%" + usname + "%";
            }

            //檢查是否有財會核決權限
            var check = dao.checkcontrol(User.Identity.Name.ToString(), 24);//待新增

            //有核決權限,識別碼OK
            if (check.Rows.Count != 0)
            {
                checkma.Text = "OK";
            }
            //檢查是否有查他人請款單權限
            var check2 = dao.checkcontrol(User.Identity.Name.ToString(), 25);//待新增

            //有核決權限,可以性名方式搜尋
            if (check2.Rows.Count != 0)
            {
                TextBox3.ReadOnly = false;
            }
        }