Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            UserClass c = new UserClass();

            string person_username = Request.Url.AbsolutePath.ToString().Replace("/", "");

            double num;

            if (double.TryParse(person_username, out num))
            {
                var adminid = HttpContext.Current.Request.Cookies["adminname@ranger"].Value;
                adminname_span.InnerText = adminid.ToString();



                var pubuser = c.GetUserDetails(person_username);

                profilepic_img.Src         = "http://publicdomainvectors.org/photos/generic-avatar.png"; //"https://" + pubuser.ProfilePicture;
                profilename_text.InnerText = pubuser.Name;
                usermobile_span.InnerText  = pubuser.MobileNumber;


                PinClass p = new PinClass();
                txtcurrentUser.InnerText  = p.CurrentUserCount().ToString();
                txtAcceptpins.InnerText   = p.ApprovedPinCount().ToString();
                txtRejectedPins.InnerText = p.RejectedPinCount().ToString();
            }
            else
            {
                Response.Redirect("~/home.aspx");
            }
        }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (HttpContext.Current.Request.Cookies["adminname@ranger"] != null || HttpContext.Current.Request.Cookies["adminuserid@ranger"] != null || HttpContext.Current.Request.Cookies["adminpass@ranger"] != null)
     {
         login_name.InnerText = HttpContext.Current.Request.Cookies["adminname@ranger"].Value;
         PinClass p = new PinClass();
         txtcurrentUser.InnerText  = p.CurrentUserCount().ToString();
         txtAcceptpins.InnerText   = p.ApprovedPinCount().ToString();
         txtRejectedPins.InnerText = p.RejectedPinCount().ToString();
     }
     else
     {
         Response.Redirect("~/adminlogin.aspx");
     }
 }