private int UpdateRecord_ChangePassword()
    {
        int intActionResult = 0;

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

                eocPropertyBean.Classifieds_UserProfile_ProfileID     = intProfileID;
                eocPropertyBean.Classifieds_UserProfile_OldPassword   = txtOldPassword.Text;
                eocPropertyBean.Classifieds_UserProfile_LoginPassword = txtNewPassword1.Text;
                eocPropertyBean.UpdatedOn = DateTime.Now;

                intActionResult = bocUserProfile.UpdateRecord_ChangePassword(eocPropertyBean);
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }

        return(intActionResult);
    }
コード例 #2
0
    private int UpdateRecord_UserProfile()
    {
        int intActionResult = 0;

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

                eocPropertyBean.Classifieds_UserProfile_ProfileID      = intProfileID;
                eocPropertyBean.Classifieds_UserProfile_LoginEmail     = txtEmail1.Text;
                eocPropertyBean.Classifieds_UserProfile_AdvertiserName = txtName.Text;
                //eocPropertyBean.Province_ProvinceID = Convert.ToInt32(ddlProvince.SelectedItem.Value);
                eocPropertyBean.Classifieds_UserProfile_ContactAddress = txtAddress.Text;
                eocPropertyBean.Classifieds_UserProfile_Mobile         = txtCellPhoe.Text;
                // eocPropertyBean.UpdatedOn = DateTime.Now;
                eocPropertyBean.ClassifiedImagePathEdit = ImagePathEditClassified.ToString();


                intActionResult = bocUserProfile.UpdateRecord_UserProfile(eocPropertyBean);
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }

        return(intActionResult);
    }
コード例 #3
0
    private void LoadRecord_Province(string StateID)
    {
        try
        {
            if (!string.IsNullOrEmpty(StateID) && StateID != "-1")
            {
                using (BOC_Classifieds_UserProfile bocUserProfile = new BOC_Classifieds_UserProfile())
                {
                    EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();
                    eocPropertyBean.State_StateID = Convert.ToInt32(StateID);

                    DataTable dtPovince = bocUserProfile.LoadRecord_Province(eocPropertyBean);

                    ddlProvince.Items.Clear();
                    ddlProvince.Items.Add(new ListItem("Select", "-1"));

                    if (dtPovince.Rows.Count > 0)
                    {
                        ddlProvince.DataSource     = dtPovince;
                        ddlProvince.DataValueField = "ProvinceID";
                        ddlProvince.DataTextField  = "Province";
                        ddlProvince.DataBind();
                    }
                }
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            strLinkID = Request.QueryString["LinkCode"];
            strProfileID = Request.QueryString["ProfileCode"];

            if (!string.IsNullOrEmpty(strLinkID) && !string.IsNullOrEmpty(strProfileID))
            {
                strLinkID = UTLUtilities.Decrypt(strLinkID);
                strProfileID = UTLUtilities.Decrypt(strProfileID);

                using (BOC_Classifieds_UserProfile bocUserProfile = new BOC_Classifieds_UserProfile())
                {
                    EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();
                    eocPropertyBean.Classifieds_ActivationLinks_LinkID = Convert.ToInt32(strLinkID);
                    eocPropertyBean.Classifieds_UserProfile_ProfileID = Convert.ToInt32(strProfileID);
                    eocPropertyBean.Classifieds_ActivationLinks_IsChecked = true;

                    intActionResult = bocUserProfile.UpdateRecord_ActivationLinks(eocPropertyBean);

                    if (intActionResult > 0)
                    {
                        Response.Redirect("Default.aspx");
                    }
                    else
                    {
                        lblSystemMessage.Text = "This link has been expired...";
                    }
                }
            }
        }
    }
コード例 #5
0
    private void SelectRecord_UserProfile(int intProfileID)
    {
        try
        {
            using (BOC_Classifieds_UserProfile bocUserProfile = new BOC_Classifieds_UserProfile())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();
                eocPropertyBean.Classifieds_UserProfile_ProfileID = intProfileID;

                if (bocUserProfile.SelectRecord_UserProfile(eocPropertyBean))
                {
                    txtEmail1.Text            = eocPropertyBean.Classifieds_UserProfile_LoginEmail;
                    txtEmail2.Text            = eocPropertyBean.Classifieds_UserProfile_LoginEmail;
                    txtName.Text              = eocPropertyBean.Classifieds_UserProfile_AdvertiserName;
                    txtAddress.Text           = eocPropertyBean.Classifieds_UserProfile_ContactAddress;
                    ddlCountry.SelectedValue  = eocPropertyBean.Country_CountryID.ToString();
                    ddlState.SelectedValue    = eocPropertyBean.State_StateID.ToString();
                    ddlProvince.SelectedValue = eocPropertyBean.Province_ProvinceID.ToString();
                    txtCellPhoe.Text          = eocPropertyBean.Classifieds_UserProfile_Mobile;
                    ClassifiedImagePath       = eocPropertyBean.Classified_ImagePath.ToString();
                    if (ClassifiedImagePath == "")
                    {
                        ClassifiedImagePath = "../Classifieds_ProductImage/index.jpg";
                    }
                }
                else
                {
                    strSystemMessage  = "<table style='width:500px; border:1px dashed #666666;'>";
                    strSystemMessage += "<tr>";
                    strSystemMessage += "<td align='center' style='width:10%;'><img src='../images/icon_error.gif' width='42' height='40' alt='' /></td>";
                    strSystemMessage += "<td valign='middle' style='width:90%;font-weight:bold; text-decoration:underline'>Following error occured :</td>";
                    strSystemMessage += "</tr>";

                    strSystemMessage += "<tr>";
                    strSystemMessage += "<td colspan='2' style='width:100%; color:#000000; padding-top:7px; padding-left:10px;'>";
                    strSystemMessage += "User Profile not found!";
                    strSystemMessage += "<br/><br/>";
                    strSystemMessage += "<strong>How did this happen? </strong>";
                    strSystemMessage += "<ul>";
                    strSystemMessage += "<li>You login session may be expired.</li>";
                    strSystemMessage += "<li>Your Classified Account may be deleted by ApnerDeal authority for some reason.</li>";
                    strSystemMessage += "</ul>";
                    strSystemMessage += "</td>";
                    strSystemMessage += "</tr>";
                    strSystemMessage += "</table>";

                    lblSystemMessage.Text = strSystemMessage;
                }
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }
    }
コード例 #6
0
 private void LoadRecord_Country()
 {
     try
     {
         using (BOC_Classifieds_UserProfile bocUserProfile = new BOC_Classifieds_UserProfile())
         {
             ddlCountry.DataSource     = bocUserProfile.LoadRecord_Country();
             ddlCountry.DataValueField = "CountryID";
             ddlCountry.DataTextField  = "Country";
             ddlCountry.DataBind();
         }
     }
     catch (Exception Exp)
     {
         lblSystemMessage.Text = Exp.Message.ToString();
     }
 }
コード例 #7
0
    private void IsLoginValid()
    {
        try
        {
            using (BOC_Classifieds_UserProfile bocUserProfile = new BOC_Classifieds_UserProfile())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();

                eocPropertyBean.Classifieds_UserProfile_LoginEmail    = txtLoginEmail.Text;
                eocPropertyBean.Classifieds_UserProfile_LoginPassword = txtPassword.Text;

                if (!bocUserProfile.IsLoginValid(eocPropertyBean))
                {
                    lblSystemMessage.Text = "Access denied! Invalid Login Email or Password.";
                }
                else
                {
                    if (!eocPropertyBean.Classifieds_UserProfile_IsActive)
                    {
                        lblSystemMessage.Text = "Your classified account is not active.";
                    }
                    else
                    {
                        this.Session.Clear();
                        this.Session["CLSF_PROFILE_CODE"] = eocPropertyBean.Classifieds_UserProfile_ProfileID.ToString();
                        this.Session["CLSF_COUNTRY_CODE"] = eocPropertyBean.Country_CountryID.ToString();
                        this.Session["IS_ADMIN"]          = eocPropertyBean.IsAdmin;
                        this.Session["COUNTRY"]           = eocPropertyBean.Country_CountryName;
                        this.Session["LOGINEMAIL"]        = eocPropertyBean.Classifieds_UserProfile_LoginEmail;
                        this.Session["ADVERTISERNAME"]    = eocPropertyBean.Classifieds_UserProfile_AdvertiserName;


                        //this.Session["CLSF_PROVINCE_CODE"] = eocPropertyBean.Province_ProvinceID.ToString();

                        Response.Redirect("ControlPanel.aspx", false);
                    }
                }
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }
    }
コード例 #8
0
    private void IsClassifiedUserLoginValid()
    {
        try
        {
            using (BOC_Classifieds_UserProfile bocUserProfile = new BOC_Classifieds_UserProfile())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();

                eocPropertyBean.Classifieds_UserProfile_LoginEmail    = txtLoginEmail.Text;
                eocPropertyBean.Classifieds_UserProfile_LoginPassword = txtPassword.Text;

                if (!bocUserProfile.IsLoginValid(eocPropertyBean))
                {
                    lblSystemMessage.Text = "Access denied! Invalid Login Email or Password.";
                }
                else
                {
                    if (!eocPropertyBean.Classifieds_UserProfile_IsActive)
                    {
                        lblSystemMessage.Text = "Your classified account is not active.";
                    }
                    else
                    {
                        this.Session["CL_ID"]      = eocPropertyBean.Classifieds_UserProfile_ProfileID.ToString();
                        this.Session["COUNTRY_ID"] = eocPropertyBean.Country_CountryID.ToString();
                        //this.Session["CLSF_PROVINCE_CODE"] = eocPropertyBean.Province_ProvinceID.ToString();

                        //strRedirect = "Type=CL";
                        strEncryptedUrl = UTLUtilities.Encrypt("Type=CL");
                        isLoginValid    = true;
                    }
                }
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }
    }
コード例 #9
0
    private int AddRecord_UserProfile()
    {
        int intActionResult = 0;

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

                eocPropertyBean.Classifieds_UserProfile_LoginEmail     = txtEmail1.Text;
                eocPropertyBean.Classifieds_UserProfile_LoginPassword  = txtPassword1.Text;
                eocPropertyBean.Classifieds_UserProfile_AdvertiserName = txtName.Text;
                eocPropertyBean.Classifieds_UserProfile_ContactAddress = txtAddress.Text;
                eocPropertyBean.Province_ProvinceID            = Convert.ToInt32(ddlProvince.SelectedItem.Value);
                eocPropertyBean.Classifieds_UserProfile_Mobile = txtCellPhoe.Text;
                eocPropertyBean.UpdatedOn = DateTime.Now;
                eocPropertyBean.ImagePath = ImagePath.ToString();
                eocPropertyBean.Source    = ddlSource.SelectedValue;
                if (ddlSource.SelectedValue == "News Paper" || ddlSource.SelectedValue == "Search Engine" || ddlSource.SelectedValue == "Friend")
                {
                    eocPropertyBean.ReferalName = Server.HtmlEncode(txtReferalName.Text);
                }
                else
                {
                    eocPropertyBean.ReferalName = "";
                }

                intActionResult = bocUserProfile.AddRecord_UserProfile(eocPropertyBean);
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }

        return(intActionResult);
    }
コード例 #10
0
    private void SendActivationLink()
    {
        try
        {
            using (BOC_Classifieds_UserProfile bocUserProfile = new BOC_Classifieds_UserProfile())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();
                eocPropertyBean.Classifieds_UserProfile_LoginEmail = lblEmailAddress.Text;

                int intActionResult = bocUserProfile.AddRecord_ActivationLinks(eocPropertyBean);

                if (intActionResult == -1)
                {
                    lblSystemMessage.Text = "User Profile not found. Please try after sometimes.";
                }
                else
                {
                    if (intActionResult > 0)
                    {
                        DataTable dtActivationLink = bocUserProfile.SelectRecord_ActivationLinks(eocPropertyBean);

                        if (dtActivationLink.Rows.Count > 0)
                        {
                            string strAdvertiserName = string.Empty;
                            string strLinkID         = string.Empty;
                            string strProfileID      = string.Empty;
                            string strMailBody       = string.Empty;

                            MailMaster        mailMaster = new MailMaster();
                            HttpServerUtility httpObject = HttpContext.Current.Server;

                            strAdvertiserName = dtActivationLink.Rows[0]["AdvertiserName"].ToString();
                            strLinkID         = UTLUtilities.Encrypt(dtActivationLink.Rows[0]["LinkID"].ToString());
                            strProfileID      = UTLUtilities.Encrypt(dtActivationLink.Rows[0]["ProfileID"].ToString());

                            strMailBody  = "<div style=\"font-family:Verdana; font-size:11px; padding-left:10px;\">";
                            strMailBody += "Dear <strong>" + strAdvertiserName + "</strong>,";
                            strMailBody += "<br/><br/>";
                            strMailBody += "Thank you for registration at <a href=\"http://www.apnerdeal.com\" target=\"_blank\">www.apnerdeal.com</a> ! We are pleased to welcome you to our service and we hope that you will find it very valuable and useful.";
                            strMailBody += "<br/><br/>";
                            strMailBody += "<strong>Completing the registration :</strong>";
                            strMailBody += "<br/><br/>";
                            strMailBody += "Your new account has been created, and only one more step is needed to complete the registration process.";
                            strMailBody += "<br/>";
                            strMailBody += "Please click <a href=\"http://www.apnerdeal.com/classifieds/UserProfile_Step03.aspx?LinkCode=" + httpObject.UrlEncode(strLinkID) + "&ProfileCode=" + httpObject.UrlEncode(strProfileID) + "\" target=\"_blank\">here</a> to complete the verification.";
                            strMailBody += "<br/><br/>";
                            strMailBody += "If you are unable to click the link above, please copy and paste the following link into your browser window.";
                            strMailBody += "<br/><br/>";
                            strMailBody += "http://www.apnerdeal.com/classifieds/UserProfile_Step03.aspx?LinkCode=" + httpObject.UrlEncode(strLinkID) + "&ProfileCode=" + httpObject.UrlEncode(strProfileID);
                            strMailBody += "<br/><br/>";
                            strMailBody += "Best regards,";
                            strMailBody += "<br/><br/>";
                            strMailBody += "ApnerDeal.com Team";
                            strMailBody += "<br/><br/>";
                            strMailBody += "<p style=\"font-weight:bold; font-size:12px;\">This is a System Generated email, please do not reply</p>";
                            strMailBody += "</div>";

                            //lblEmailAddress.Text = strMailBody;
                            mailMaster.MailTo      = lblEmailAddress.Text;
                            mailMaster.MailFrom    = "*****@*****.**";
                            mailMaster.MailSubject = "Activate your www.apnerdeal.com Account";
                            mailMaster.MailBody    = strMailBody;
                            mailMaster.IsHTMLBody  = true;
                            mailMaster.SendMail();
                        }
                    }
                    else
                    {
                        lblSystemMessage.Text = "System failed to register your profile. Please try after sometimes.";
                    }
                }
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }
    }