Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         UsFuns uf  = new UsFuns();
         User   tmp = uf.UsrInfo(Session["login"].ToString());
         if (Session["login"] == null)
         {
             Response.Write("<script language='javascript'>alert('Response Timeout, Please Try Again.'); location.href='login.aspx'</script>");
         }
         else if (tmp.Admin == '2')
         {
             this.U_service1.Visible       = false;
             this.U_showmsg1.Visible       = false;
             this.U_showpet1.Visible       = false;
             this.Button_submit.Visible    = false;
             this.DropDownList_pet.Visible = false;
             SqlFuns sf = new SqlFuns();
             bindusr(sf.SearchUserByPermission('1'));
         }
         else
         {
             Response.Write("<script language='javascript'>alert('Response Timeout, Please Try Again.'); location.href='login.aspx'</script>");
         }
     }
 }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         UsFuns uf  = new UsFuns();
         User   tmp = uf.UsrInfo(Session["login"].ToString());
         if (Session["login"] == null)
         {
             Response.Write("<script language='javascript'>alert('Response Timeout, Please Try Again.'); location.href='login.aspx'</script>");
         }
         else if (tmp.Admin == '0')
         {
             SqlFuns sf = new SqlFuns();
             bindusr(sf.SearchUserAll());
         }
         else
         {
             Response.Write("<script language='javascript'>alert('Response Timeout, Please Try Again.'); location.href='login.aspx'</script>");
         }
     }
 }