protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string strPreviousPage = "";
            if (Request.UrlReferrer != null)
            {
                strPreviousPage = Request.UrlReferrer.Segments[Request.UrlReferrer.Segments.Length - 1];

                if (Session["AdvisorID"] == null || Session["AdvisorID"].ToString() == "")
                {
                    Response.Redirect("../AdminLogin.aspx", false);
                }
            }
            if (strPreviousPage == "")
            {
                Response.Redirect("~/AdminLogin.aspx");
            }
            if (!IsPostBack)
            {
                _objComman.GetProvince(ddlProvince);
                _objComman.GetCity(ddlCity);
            }
        }
        catch
        {
            lblTitle.Text      = "Warning!";
            lblTitle.ForeColor = System.Drawing.Color.Red;
            message.ForeColor  = System.Drawing.Color.Red;
            message.Text       = "Sorry, Something went wrong, please contact administrator";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true);
        }
    }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         _objComman.GetProvince(ddlProvince);
         _objComman.GetCity(ddlCity);
     }
 }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string strPreviousPage = "";
            if (Request.UrlReferrer != null)
            {
                strPreviousPage = Request.UrlReferrer.Segments[Request.UrlReferrer.Segments.Length - 1];

                if (Session["AdvisorID"] == null || Session["AdvisorID"].ToString() == "")
                {
                    Response.Redirect("../AdminLogin.aspx", false);
                }
                else
                {
                    if (!IsPostBack)
                    {
                        _objComman.GetProvince(ddlProvince);
                        _objComman.GetCity(ddlCity);
                        _objComman.getRecordsPerPage(DropPage);
                        _objComman.getRecordsPerPage(DropPageValidate);
                        _objComman.getRecordsPerPage(DropPageFeedback);
                        GetGridData();
                        BindAdvisors();
                        //ValidateGridData();
                        //FeedbackGridData();
                        sectionClientList.Visible     = true;
                        editSection.Visible           = false;
                        statusSection.Visible         = false;
                        validateSection.Visible       = false;
                        ClientFeedbackSection.Visible = false;
                        lblResignedDate.Visible       = false;
                        txtResignedDate.Visible       = false;
                        rfvResignedDate.Enabled       = false;
                    }
                }
            }
            if (strPreviousPage == "")
            {
                Response.Redirect("~/AdminLogin.aspx");
            }
        }
        catch
        {
            lblTitle.Text      = "Warning!";
            lblTitle.ForeColor = System.Drawing.Color.Red;
            message.ForeColor  = System.Drawing.Color.Red;
            message.Text       = "Sorry, Something went wrong, please contact administrator";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true);
        }
    }