Пример #1
0
    private void CheckQueryString()
    {
        try
        {
            object objPFI = Request.QueryString["PI"];
            object objCI  = Request.QueryString["CI"];
            object objCC  = Request.QueryString["CC"];

            if (objPFI != null && objCI != null)
            {
                ProfileID  = Convert.ToInt32(objPFI);
                CouponID   = Convert.ToInt32(objCI);
                CouponCode = objCC.ToString();
            }
            else
            {
                string data = UTLUtilities.Encrypt("Parameter missing");
                Server.Transfer("../Error.aspx?data=" + data, false);
            }
        }
        catch (Exception ex)
        {
            lblSystemMessage.Text = ex.Message;
        }
    }
 protected void btnSearchProduct_Click(object sender, EventArgs e)
 {
     if (site_search.Text.ToString() != "")
     {
         Response.Redirect("../Common/SearchResult.aspx?Key=" + UTLUtilities.Encrypt(site_search.Text.ToString())
                           + "&Loc=" + UTLUtilities.Encrypt(Country), true);
     }
 }
Пример #3
0
 protected void btnSearchProduct_Click(object sender, EventArgs e)
 {
     if (site_search.Text.ToString() != "")
     {
         if (Page.IsPostBack)
         {
             Response.Redirect("SearchResultDiscount.aspx?Key=" + UTLUtilities.Encrypt(site_search.Text.ToString())
                               + "&Loc=" + UTLUtilities.Encrypt("Bangladesh"), true);
         }
     }
 }
Пример #4
0
    protected void btnPlaceOrder_Click1(object sender, EventArgs e)
    {
        // this.LoadRecord_Buyer_Information(intProfileID, UserType);
        try
        {
            using (ShoppingCartAccess shoppingCart = new ShoppingCartAccess())
            {
                if (Int32.TryParse(hfOrderID.Value, out intOrderID))
                {
                    if (!shoppingCart.IsOrder_PlacedOnce(intOrderID))
                    {
                        if (shoppingCart.Verify_CustomerOrder(intOrderID,
                                                              hfCustomerName.Value, hfCustomerEmail.Value, hfShippingAddress.Value, hfBillingAddress.Value))
                        {
                            string strQueryString = "oi=" + hfOrderID.Value;
                            strQueryString += "&pfi=" + hfProfileID.Value;
                            strQueryString += "&ut=" + hfUserType.Value;
                            strQueryString += "&po=" + hfPaymentOption.Value;
                            //strQueryString += "&po=" + Server.UrlEncode(hfPaymentOption.Value);
                            strQueryString += "&total=" + hfTotalAmount.Value;
                            strQueryString += "&curr=" + hfCurrency.Value;

                            string strEncryptedUrl = UTLUtilities.Encrypt(strQueryString);
                            //string strDecryptedUrl =

                            Response.Redirect("OrderConfirmation.aspx?data=" + strEncryptedUrl, false);
                        }
                        else
                        {
                            lblSystemMessage.Text = "There were some errors processing your order. Please contact Boromela.";
                        }
                    }
                    else
                    {
                        string data = UTLUtilities.Encrypt("You may have already placed this order once.");
                        Response.Redirect("../Error.aspx?data=" + data, false);
                    }
                }
            }
        }
        catch (Exception ex)
        {
            lblSystemMessage.Text = "Error: " + ex.Message;
        }
    }
Пример #5
0
 private void CheckQueryString()
 {
     try
     {
         object objPFI = Request.QueryString["PI"];
         object objUN  = Request.QueryString["CN"];
         PageMode = Request.QueryString["mode"];
         object objCI = Request.QueryString["CI"];
         if (PageMode == "0")
         {
             if (objPFI != null && objUN != null)
             {
                 CompanyName = objUN.ToString();
                 ProfileID   = Convert.ToInt32(objPFI);
             }
             else
             {
                 string data = UTLUtilities.Encrypt("Parameter missing");
                 Server.Transfer("Error.aspx?data=" + data, false);
             }
         }
         else if (PageMode == "1")
         {
             if (objCI != null)
             {
                 CategoryID = Convert.ToInt16(objCI);
                 Category   = Request.QueryString["CA"];
             }
             else
             {
                 string data = UTLUtilities.Encrypt("Parameter missing");
                 Server.Transfer("Error.aspx?data=" + data, false);
             }
         }
         else
         {
             string data = UTLUtilities.Encrypt("Parameter missing");
             Server.Transfer("Error.aspx?data=" + data, false);
         }
     }
     catch (Exception ex)
     {
         lblSystemMessage.Text = ex.Message;
     }
 }
Пример #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.ProductID         = Request.QueryString["ItemKey"];
        this.ProfileID         = Request.QueryString["ProfKey"];
        this.CategoryID        = Request.QueryString["CID"];
        this.SubcategoryID     = Request.QueryString["SCID"];
        this.Location          = Request.QueryString["Location"];
        this.AdvertisementType = Request.QueryString["AdType"];
        string strHtml = "";

        if (UTLUtilities.IsNumeric(this.ProductID) && UTLUtilities.IsNumeric(this.ProfileID) && UTLUtilities.IsNumeric(this.CategoryID) && UTLUtilities.IsNumeric(this.SubcategoryID))
        {
            this.IsProfileFound = this.SelectRecord_ProductProfile(Convert.ToInt32(this.ProductID), Convert.ToInt32(this.ProfileID));
            //lblLocationn.Text = this.Location;
            txtProductID.Text = this.ProductID;
            string strAdvertisementType = string.Empty;
            //strAdvertisementType = GetOfferType(this.CategoryID, dtProductProfile.Rows[0]["AdvertiseMentType"].ToString());
            if (IsProfileFound)
            {
                this.LoadRecord_ProductReview(Convert.ToInt32(this.ProductID));
                if (CategoryID == "9")
                {
                    pnlPrice.Visible = false;
                    pnlAlternatePriceOffer.Visible = false;
                }
                else
                {
                    pnlPrice.Visible = true;
                }
            }
            else
            {
                strHtml = "This product may have been removed by the administrator.";
                strHtml = UTLUtilities.Encrypt(strHtml);
                Response.Redirect("Error.aspx?data=" + strHtml);
            }
        }
        else
        {
            Response.Redirect("Default.aspx");
        }
    }
Пример #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        bool businessUser    = true;
        bool classifiedsUser = false;

        if (!Page.IsPostBack)
        {
            try
            {
                this.CheckQueryString();
                this.CheckUserSession();
                this.PopulateControls();
            }
            catch (FormatException fmExp)
            {
                string data = UTLUtilities.Encrypt("Url has been modified.");
                Response.Redirect("../Error.aspx?data=" + data, false);
            }
            catch (Exception ex)
            {
                lblSystemMessage.Text = "Error: " + ex.Message;
            }
            lblPaymentOption.Text  = "<strong style=\"font-size:12px;font-family:verdana; color:#990000\">";
            lblPaymentOption.Text += strPaymentOption + "</strong>";
            switch (strUserType)
            {
            case "BS":
            {
                this.LoadRecord_Buyer_Information(intProfileID, businessUser);
                break;
            }

            case "CL":
            {
                this.LoadRecord_Buyer_Information(intProfileID, classifiedsUser);
                break;
            }
            }
            lblPaymentOption.Text  = "<strong style=\"font-size:12px;font-family:verdana; color:#990000\">";
            lblPaymentOption.Text += strPaymentOption + "</strong>";
        }
    }
Пример #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.CheckQueryString();
     if (!Page.IsPostBack)
     {
         if (PageMode == "0")
         {
             this.Load_DiscountByCompany(ProfileID);
         }
         else if (PageMode == "1")
         {
             this.Load_DiscountByCategory(CategoryID);
         }
         else
         {
             string data = UTLUtilities.Encrypt("Parameter missing");
             Server.Transfer("Error.aspx?data=" + data, false);
         }
     }
 }
Пример #9
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();
        }
    }
Пример #10
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();
        }
    }
Пример #11
0
    /// <summary>
    /// Description      : Send activation link through email to newly registered user.
    /// Stored Procedure : -
    /// Associate Control: Executes in Page_Load event.
    /// </summary>
    private void SendActivationLink()
    {
        try
        {
            using (BOC_Corporate_UserProfile bocUserProfile = new BOC_Corporate_UserProfile())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();
                eocPropertyBean.Business_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 companyName = string.Empty;
                            string linkID      = string.Empty;
                            string profileID   = string.Empty;
                            string mailBody    = string.Empty;

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

                            companyName = dtActivationLink.Rows[0]["CompanyName"].ToString();
                            linkID      = UTLUtilities.Encrypt(dtActivationLink.Rows[0]["LinkID"].ToString());
                            profileID   = UTLUtilities.Encrypt(dtActivationLink.Rows[0]["ProfileID"].ToString());

                            mailBody  = "<div style=\"font-family:Verdana; font-size:11px; padding-left:10px;\">";
                            mailBody += "Dear " + companyName + ",";
                            mailBody += "<br/><br/>";

                            mailBody += "Thank you for registration at <a href=\"http://www.apnerdeal.com\"> 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.";
                            mailBody += "<br/><br/>";
                            mailBody += "Your new account has been created, and only one more step is needed to login.";
                            mailBody += "<br/>";
                            mailBody += "<br/>";

                            mailBody += "Please click <a href=\"http://www.apnerdeal.com/Corporate/Default.aspx" + "\">here</a> to post discounts or deals.";
                            mailBody += "<br/><br/>";

                            mailBody += "Please click <a href=\"http://www.apnerdeal.com/Classifieds/Default.aspx" + "\">here</a> to post Classified Ad.";
                            mailBody += "<br/><br/>";

                            mailBody += "If you are unable to click the link above, please copy and paste the following link into your browser window:";
                            mailBody += "<br/><br/>";
                            mailBody += "http://www.apnerdeal.com/corporate/UserProfile_Step03.aspx?LinkCode=" + httpObject.UrlEncode(linkID) + "&ProfileCode=" + httpObject.UrlEncode(profileID);
                            mailBody += "<br/><br/>";
                            mailBody += "Best regards,";
                            mailBody += "<br/><br/>";
                            mailBody += "ApnerDeal.com Team";
                            mailBody += "<br/><br/>";
                            mailBody += "<p style=\"font-weight:bold; font-size:12px;\">This is a System Generated email, please do not reply.</p>";
                            mailBody += "</div>";

                            mailMaster.MailTo      = lblEmailAddress.Text;
                            mailMaster.MailFrom    = "*****@*****.**";
                            mailMaster.MailSubject = "Welcome to your www.ApnerDeal.com account";
                            mailMaster.MailBody    = mailBody;
                            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();
        }
    }
    private void Display_RecordNotFound_ErrorPage()
    {
        string strErrorMessage = UTLUtilities.Encrypt("Your requested item has not found. It may have been blocked by the user or by the administrator.");

        Response.Redirect("Error.aspx?data=" + strErrorMessage);
    }
Пример #13
0
    /// <summary>
    /// Loads Buyers information.
    /// </summary>
    /// <param name="intProfleID"></param>
    /// <param name="userType"></param>
    private void LoadRecord_Buyer_Information(int intProfileID, bool userType)
    {
        bool _BusinessUser = true;
        //bool _CL = false;

        string strBuyerInfo = string.Empty;

        dtBuyerInformation = new DataTable();
        try
        {
            using (BC_Product bcProduct = new BC_Product())
            {
                dtBuyerInformation = bcProduct.LoadProduct_Buyer_Information(intProfileID, userType);
                if (dtBuyerInformation.Rows.Count > 0)
                {
                    strBuyerInfo = string.Empty;

                    strBuyerInfo += "<div style=\"line-height:15px;color:#000000\">";
                    if (userType == _BusinessUser)
                    {
                        strBuyerInfo += "<strong style=\"font-size:12px;font-family:verdana\">Company Name: </strong>";
                    }
                    else
                    {
                        strBuyerInfo += "<strong style=\"font-size:12px;font-family:verdana\">Your Name: </strong>";
                    }

                    strBuyerInfo += dtBuyerInformation.Rows[0]["SellerInfo"].ToString() + "<br/>";

                    if (userType == _BusinessUser)
                    {
                        strBuyerInfo += "<strong style=\"font-size:12px;font-family:verdana\">User Name: </strong>";
                        strBuyerInfo += dtBuyerInformation.Rows[0]["UserName"].ToString() + "<br/>";
                    }


                    strBuyerInfo += "<strong style=\"font-size:12px;font-family:verdana\">Website: </strong>";
                    strBuyerInfo += dtBuyerInformation.Rows[0]["URL"].ToString() + "<br/>";

                    strBuyerInfo += "<strong style=\"font-size:12px;font-family:verdana\">Cell no: </strong>";
                    strBuyerInfo += dtBuyerInformation.Rows[0]["CellNo"].ToString() + "<br/>";

                    strBuyerInfo += "<strong style=\"font-size:12px;font-family:verdana\">Address: </strong>";
                    strBuyerInfo += dtBuyerInformation.Rows[0]["UserAddress"].ToString() + "<br/>";
                    strBuyerInfo += dtBuyerInformation.Rows[0]["Province"].ToString() + ", ";
                    strBuyerInfo += dtBuyerInformation.Rows[0]["State"].ToString() + ", ";
                    strBuyerInfo += dtBuyerInformation.Rows[0]["Country"].ToString() + ".<br/></div>";


                    strBillingAddress  = dtBuyerInformation.Rows[0]["UserAddress"].ToString();
                    strBillingAddress += dtBuyerInformation.Rows[0]["Province"].ToString();
                    strBillingAddress += dtBuyerInformation.Rows[0]["State"].ToString();
                    strBillingAddress += dtBuyerInformation.Rows[0]["Country"].ToString();

                    //strShippingAddress = strBillingAddress;

                    strCustomarEmail = dtBuyerInformation.Rows[0]["LoginEmail"].ToString();
                    strCustomerName  = dtBuyerInformation.Rows[0]["UserName"].ToString();

                    hfBillingAddress.Value  = strBillingAddress;
                    hfShippingAddress.Value = strBillingAddress;
                    hfCustomerEmail.Value   = strCustomarEmail;
                    hfCustomerName.Value    = strCustomerName;

                    lblShippingAddress.Text = strBuyerInfo;
                    lblBillingAddress.Text  = strBuyerInfo;
                }
                else
                {
                    string data = UTLUtilities.Encrypt("Error in processing your order. Please contact Boromela.com");
                    Response.Redirect("../Error.aspx?data=" + data, false);
                }
            }
        }
        catch (Exception ex)
        {
            lblSystemMessage.Text = "Error: " + ex.Message;
        }
    }