コード例 #1
0
    /// <summary>
    /// Description      : Check Business User login authentication.
    /// Stored Procedure : USP_CP_UsrPro_GetLoginInfo
    /// Associate Control: Executes in Page_Load event.
    /// </summary>
    private void IsLoginValid()
    {
        rfvLoginEmail.Enabled = true;
        revLoginEmail.Enabled = true;
        rfvPassword.Enabled   = true;

        try
        {
            using (BOC_Corporate_UserProfile bocUserProfile = new BOC_Corporate_UserProfile())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();

                eocPropertyBean.Business_UserProfile_LoginEmail    = txtLoginEmail.Text;
                eocPropertyBean.Business_UserProfile_LoginPassword = txtPassword.Text;

                if (!bocUserProfile.IsLoginValid(eocPropertyBean))
                {
                    lblSystemMessage.Text = "Access denied! Invalid Login Email or Password.";
                }
                else
                {
                    if (!eocPropertyBean.Business_UserProfile_IsActive)
                    {
                        lblSystemMessage.Text = "Your corporate account is not active.";
                    }
                    else
                    {
                        this.Session.Clear();
                        this.Session["CORP_PROFILE_CODE"] = eocPropertyBean.Business_UserProfile_ProfileID.ToString();
                        this.Session["CORP_COUNTRY_CODE"] = "18";         //eocPropertyBean.Country_CountryID.ToString();
                        this.Session["COUNTRY"]           = "Bangladesh"; //eocPropertyBean.Country_CountryName;

                        this.Session["LOGINEMAIL"]  = eocPropertyBean.Business_UserProfile_LoginEmail;
                        this.Session["COMPANYNAME"] = eocPropertyBean.Business_UserProfile_CompanyName;
                        this.Session["ISADMIN"]     = eocPropertyBean.IsAdmin;

                        Response.Redirect("ControlPanel.aspx");
                    }
                }
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }
    }
コード例 #2
0
    /// <summary>
    /// Description      : Check Business User login authentication.
    /// Stored Procedure : USP_CP_UsrPro_GetLoginInfo
    /// Associate Control: Executes in Page_Load event.
    /// </summary>
    private void IsLoginValid()
    {
        try
        {
            using (BOC_Corporate_UserProfile bocUserProfile = new BOC_Corporate_UserProfile())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();

                eocPropertyBean.Business_UserProfile_LoginEmail    = txtLoginEmail.Text;
                eocPropertyBean.Business_UserProfile_LoginPassword = txtPassword.Text;

                if (!bocUserProfile.IsLoginValid(eocPropertyBean))
                {
                    lblSystemMessage.Text = "Access denied! Invalid Login Email or Password.";
                }
                else
                {
                    if (!eocPropertyBean.Business_UserProfile_IsActive)
                    {
                        lblSystemMessage.Text = "Your corporate account is not active.";
                    }
                    else
                    {
                        this.Session["CORP_PROFILE_CODE"] = eocPropertyBean.Business_UserProfile_ProfileID.ToString();
                        this.Session["CORP_COUNTRY_CODE"] = eocPropertyBean.Country_CountryID.ToString();



                        Response.Redirect("ControlPanel.aspx");
                    }
                }
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }
    }
コード例 #3
0
    //private string strRedirect = string.Empty;

    private void IsBusinessUserLoginValid()
    {
        try
        {
            using (BOC_Corporate_UserProfile bocUserProfile = new BOC_Corporate_UserProfile())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();

                eocPropertyBean.Business_UserProfile_LoginEmail    = txtLoginEmail.Text;
                eocPropertyBean.Business_UserProfile_LoginPassword = txtPassword.Text;

                if (!bocUserProfile.IsLoginValid(eocPropertyBean))
                {
                    lblSystemMessage.Text = "Access denied! Invalid Login Email or Password.";
                }
                else
                {
                    if (!eocPropertyBean.Business_UserProfile_IsActive)
                    {
                        lblSystemMessage.Text = "Your corporate account is not active.";
                    }
                    else
                    {
                        this.Session["BS_ID"]      = eocPropertyBean.Business_UserProfile_ProfileID.ToString();
                        this.Session["COUNTRY_ID"] = eocPropertyBean.Country_CountryID.ToString();
                        strEncryptedUrl            = UTLUtilities.Encrypt("Type=BS");
                        isLoginValid = true;
                        //Response.Redirect("~/Commmon/PlaceOrder.aspx");
                    }
                }
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }
    }