protected void Page_Load(object sender, EventArgs e)
        {
            if (!Request.IsAuthenticated)
            {
                Response.Redirect("~/Account/Login.aspx");
            }
            if (!Page.IsPostBack)
            {
                c_helpdesk hd         = new c_helpdesk();
                string     userid     = HttpContext.Current.User.Identity.GetUserId();
                string     user_email = hd.GetEmailByUserID(userid);
                //Get user details
                DataView dv = new DataView();
                dv = hd.GetUserDetails(userid);
                if (dv.Table.Rows.Count > 0)
                {
                    string team_ids = "";
                    foreach (DataRow row in dv.Table.Rows)
                    {
                        if (!user_email.ToUpper().Contains("VANTAGEDATA") || user_email.ToUpper().Contains("DEMO"))
                        {
                            Session["team_id"] = row["team_id"].ToString();
                            team_ids           = team_ids + row["team_id"].ToString() + ",";
                        }
                        else
                        {
                            Session["team_id"] = null;
                        }

                        //Get user id of user who created the issue
                        ViewState["teamid"]    = dv.Table.Rows[0]["team_id"].ToString();
                        ViewState["companyid"] = dv.Table.Rows[0]["company_id"].ToString();
                    }
                }

                if (user_email.ToUpper().Contains("VANTAGEDATA") && !user_email.ToUpper().Contains("DEMO"))
                {
                    ViewState["vantageuser"] = "******";
                }
                else
                {
                    ViewState["vantageuser"] = "******";
                }
                LoadInit();
            }
        }
        private void BindData()
        {
            c_helpdesk hd     = new c_helpdesk();
            string     userId = User.Identity.GetUserId();

            string user_email = hd.GetEmailByUserID(userId);
            //Get user details
            DataView dv = new DataView();

            dv = hd.GetUserDetails(userId);
            if (dv.Table.Rows.Count > 0)
            {
                if (!user_email.ToUpper().Contains("DEMO"))
                {
                    DataView dvSiteList = hd.SiteList(userId);
                    ddlSite.DataSource = dvSiteList;
                    ddlSite.DataBind();
                }
            }
        }