예제 #1
0
    /// <summary>
    /// Loads all the Product Model Depending on SecondSuubcatID.
    /// </summary>
    private void LoadList_Model()
    {
        try
        {
            int categoryID     = Convert.ToInt32(ddlCategory.SelectedValue);
            int subCategoryID  = Convert.ToInt32(ddlSubcategory.SelectedValue);
            int secondSubcatID = Convert.ToInt32(ddl2ndSubCategory.SelectedValue);

            using (BC_Corporate_ProductProfile bcProductProfile = new BC_Corporate_ProductProfile())
            {
                DataTable dtModel = bcProductProfile.LoadList_Model(categoryID, subCategoryID, secondSubcatID);
                if (dtModel.Rows.Count > 0)
                {
                    ddlModel.Items.Clear();
                    ddlModel.Items.Add(new ListItem("Select Model", "-1"));
                    ddlModel.DataSource     = dtModel;
                    ddlModel.DataValueField = "ProductModelID";
                    ddlModel.DataTextField  = "ProductModel";
                    ddlModel.DataBind();
                }
                else
                {
                    ddlModel.Items.Clear();
                    ddlModel.Items.Add(new ListItem("Select Model", "-1"));
                    ddlModel.DataSource = null;
                    ddlModel.DataBind();
                    lblSystemMessage.Text = UTLUtilities.ShowGeneralMessage("No Model available");
                }
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }
    }
예제 #2
0
    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_Corporate_UserProfile bocUserProfile = new BOC_Corporate_UserProfile())
                {
                    EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();
                    eocPropertyBean.Business_ActivationLinks_LinkID    = Convert.ToInt32(strLinkID);
                    eocPropertyBean.Business_UserProfile_ProfileID     = Convert.ToInt32(strProfileID);
                    eocPropertyBean.Business_ActivationLinks_IsChecked = true;

                    intActionResult = bocUserProfile.UpdateRecord_ActivationLinks(eocPropertyBean);

                    if (intActionResult > 0)
                    {
                        Response.Redirect("Default.aspx");
                    }
                    else
                    {
                        lblSystemMessage.Text = "This link has been expired...";
                    }
                }
            }
        }
    }
예제 #3
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;
        }
    }
예제 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Request.QueryString["data"] != null)
            {
                strEncryptedUrl = Request.QueryString["data"].ToString();
                strDecryptedUrl = UTLUtilities.Decrypt(strEncryptedUrl);
                string[] strSplitUrl = strDecryptedUrl.Split('&', '=');

                strErrorMessage = strSplitUrl[0];

                strHtml += "<div align=\"center\" style=\"margin-top:80px;margin-bottom:10px\">";
                strHtml += "<img src='../images/icon_error.gif' width='42' height='40' alt='' />";
                strHtml += "</div>";
                strHtml += "<table style=\"width:600px;background-color:#EFEFE2;color:#990000;margin-bottom:80px;text-align:center;font-size:16px;font-weight:bold\"  align=\"center\">";
                strHtml += "<tr>";
                strHtml += "<td>";
                strHtml += strErrorMessage;
                strHtml += "</td>";
                strHtml += "</tr>";
                strHtml += "</table>";
                lblDisplayError.Text = strHtml;
            }
            else
            {
                Response.Redirect("Default.aspx");
            }
        }
        catch (Exception ex)
        {
            Response.Redirect("Default.aspx");
        }
    }
    /// <summary>
    /// Loads List of seller type epending On SubcategoryID from RealEstateSellerType table.
    /// </summary>
    /// <param name="intSubcategoryID"></param>
    private void LoadList_SellerType(int intSubcategoryID)
    {
        try
        {
            using (BC_Corporate_ProductProfile bcProductProfile = new BC_Corporate_ProductProfile())
            {
                ddlSellerType.Items.Clear();
                ddlSellerType.Items.Add(new ListItem("Select Seller Type", "-1"));

                DataTable dtSellerType = bcProductProfile.RealEstate_LoadList_SellerType(intSubcategoryID);
                if (dtSellerType.Rows.Count > 0)
                {
                    ddlSellerType.DataSource     = dtSellerType;
                    ddlSellerType.DataValueField = "SellerTypeID";
                    ddlSellerType.DataTextField  = "SellerType";
                    ddlSellerType.DataBind();
                }
                else
                {
                    lblSystemMessage.Text = UTLUtilities.ShowGeneralMessage("No Seller Type available.");
                }
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }
    }
예제 #6
0
    /// <summary>
    /// Loads SecondSubcategory List Based On SubcategoryID.
    /// </summary>
    private void LoadRecord_2ndSubcategory(int _CategoryID, int _SubcategoryID)
    {
        try
        {
            using (BC_Corporate_ProductProfile bcProductProfile = new BC_Corporate_ProductProfile())
            {
                ddl2ndSubCategory.Items.Clear();
                ddl2ndSubCategory.Items.Add(new ListItem("Select Second Subcategory", "-1"));

                DataTable dt2ndSubcategory = bcProductProfile.LoadRecord_2ndSubcategory(_CategoryID, _SubcategoryID);
                if (dt2ndSubcategory.Rows.Count > 0)
                {
                    ddl2ndSubCategory.DataSource     = dt2ndSubcategory;
                    ddl2ndSubCategory.DataValueField = "SecondSubcatID";
                    ddl2ndSubCategory.DataTextField  = "SecondSubCategory";
                    ddl2ndSubCategory.DataBind();
                }
                else
                {
                    lblSystemMessage.Text = UTLUtilities.ShowGeneralMessage("No Secondary sub category available");
                }
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }
    }
예제 #7
0
    private void CheckQueryString()
    {
        bool blnFlag = false;

        string strPID = Request.QueryString["PID"];

        if (string.IsNullOrEmpty(strPID))
        {
            blnFlag = false;
        }
        else
        {
            if (UTLUtilities.IsNumeric(strPID))
            {
                blnFlag = true;
            }
            else
            {
                blnFlag = false;
            }
        }
        if (blnFlag == true)
        {
            intProductID = Convert.ToInt32(Request.QueryString["PID"]);
        }
        else
        {
            Response.Redirect("Default.aspx");
        }
    }
예제 #8
0
    protected void btnRegister_Click(object sender, EventArgs e)
    {
        int    intActionResult  = 0;
        string strSystemMessage = string.Empty;

        //CaptchaControl1.ValidateCaptcha(txtCaptcha.Text);

        //if (CaptchaControl1.UserValidated)
        //{
        intActionResult = this.AddRecord_UserProfile();

        if (intActionResult > 0)
        {
            this.Session["CLSF_PROFILE_EMAIL"] = txtEmail1.Text;
            Response.Redirect("UserProfile_Step02.aspx");
        }
        if (intActionResult == -1)
        {
            strSystemMessage += "This email address already used in another user profile.";
            strSystemMessage += "<br/><br/>";
            strSystemMessage += "<strong>How did this happen? </strong>";
            strSystemMessage += "<ul>";
            strSystemMessage += "<li>You may have already registered with www.apnerdeal.com earlier but forgot about it.</li>";
            strSystemMessage += "<li>If you share your email address with someone else, they may have signed up for a ApnerDeal Free Classified account with this address.</li>";
            strSystemMessage += "</ul>";

            lblSystemMessage.Text = UTLUtilities.ShowErrorMessage(strSystemMessage);
        }
        //}
    }
예제 #9
0
    //public string DeliveryOption
    //{
    //    get
    //    {
    //        object obj = ViewState["DeliveryOption"];
    //        if (obj != null)
    //        {
    //            return obj.ToString();
    //        }
    //        return "";
    //    }
    //    set
    //    {
    //        ViewState["DeliveryOption"] = value;

    //    }
    //}
    //private UserControl_ContactSeller_Link_Ctrl ClOrderCtrl = null;


    #endregion PROPERTY

    #region CHECKQUERYSTRING METHOD

    /// <summary>
    /// Checks the query string.
    /// </summary>
    /// <returns></returns>
    private void CheckQueryString()
    {
        bool blnFlag = false;

        object objPID      = Request.QueryString["PID"];
        object objLocation = Request.QueryString["Location"];

        //strCID = Request.QueryString["CID"];
        //strSCID = Request.QueryString["SCID"];
        //strSSCID = Request.QueryString["SSCID"];
        //strProductSellerDetailID = Request.QueryString["PSID"];


        if (objPID != null)
        {
            if (UTLUtilities.IsNumeric(objPID))
            {
                ProductID = Convert.ToInt32(objPID);
                blnFlag   = true;
            }
            else
            {
                blnFlag = false;
            }
        }
        else
        {
            blnFlag = false;
        }

        if (!blnFlag)
        {
            Response.Redirect("../Default.aspx", false);
        }
    }
    protected void btnUpload_Click(object sender, EventArgs e)
    {
        string productID       = string.Empty;
        string imagePath       = string.Empty;
        int    intActionResult = 0;

        productID = Request.QueryString["PID"];
        imagePath = @"ImageHolder/Classifieds/" + productID + ".jpg";



        if (!string.IsNullOrEmpty(productID))
        {
            if (UTLUtilities.IsNumeric(productID))
            {
                if (FileUpload1.HasFile)
                {
                    if (FileUpload1.PostedFile.ContentLength > 204800)
                    {
                        lblSystemMessage.Text = "File size must be less than 200KB.";
                        Page.RegisterStartupScript("Validation", "<script language=\"javascript\">window.alert(\"File size must be less than 200KB.\");</script>");
                        return;
                    }
                    else
                    {
                        string strExtension = "";
                        String UploadedFile = FileUpload1.PostedFile.FileName;
                        if (UploadedFile.Trim() == "")
                        {
                            btnUpload.Enabled = true;
                            return;
                        }
                        int ExtractPos = UploadedFile.LastIndexOf(".");
                        strExtension = UploadedFile.Substring(ExtractPos, UploadedFile.Length - ExtractPos);

                        if ((strExtension.ToUpper() == ".BMP"))
                        {
                            Page.RegisterStartupScript("Validation", "<script language=\"javascript\">window.alert(\"Bmp format is not allowed. Please choose any other format.\");</script>");
                            lblSystemMessage.Text = "Bmp format is not allowed. Please choose any other format.";
                            return;
                        }
                        FileUpload1.SaveAs(Server.MapPath(@"../ImageHolder/Classifieds/") + productID + ".jpg");
                        using (BOC_Classifieds_ProductProfile bocProductProfile = new BOC_Classifieds_ProductProfile())
                        {
                            EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();
                            eocPropertyBean.Classifieds_ProductProfile_ProductID    = Convert.ToInt32(productID);
                            eocPropertyBean.Classifieds_ProductProfile_ProductImage = imagePath;

                            intActionResult = bocProductProfile.UpdateRecord_ProductImage(eocPropertyBean);

                            if (intActionResult > 0)
                            {
                                Response.Redirect("ControlPanel.aspx");
                            }
                        }
                    }
                }
            }
        }
    }
 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);
     }
 }
예제 #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.CheckUserSession();

        UTLUtilities.BuildDateControl(ddlStartDay1, ddlStartMonth1, ddlStartYear1);
        UTLUtilities.BuildDateControl(ddlEndDay1, ddlEndMonth1, ddlEndYear1);

        UTLUtilities.CP_ActiveModule = 4;
    }
    private void CheckQueryString()
    {
        bool blnFlag = false;

        string strPageMode = Request.QueryString["mode"];
        string strPID      = Request.QueryString["pi"];

        //string strCID = Request.QueryString["CID"];


        if (string.IsNullOrEmpty(strPageMode) || string.IsNullOrEmpty(strPID))
        {
            blnFlag = false;
        }
        else
        {
            if (strPageMode == "0" || strPageMode == "1")
            {
                if (strPageMode == "0")
                {
                    if (strPID != "-1")
                    {
                        blnFlag = false;
                    }
                    else
                    {
                        blnFlag = true;
                    }
                }
                else
                {
                    if (UTLUtilities.IsNumeric(strPID))
                    {
                        blnFlag = true;
                    }
                    else
                    {
                        blnFlag = false;
                    }
                }
            }
            else
            {
                blnFlag = false;
            }
        }

        if (blnFlag == true)
        {
            intPageMode  = Convert.ToInt32(Request.QueryString["mode"]);
            intProductID = Convert.ToInt32(Request.QueryString["pi"]);
        }
        else
        {
            Response.Redirect("Default.aspx");
        }
    }
예제 #14
0
    /// <summary>
    /// Checks the query string and returns the pagemode.
    /// </summary>
    /// <returns></returns>
    private string CheckQueryString()
    {
        bool blnFlag = false;



        strPageMode  = Request.QueryString["PageMode"];
        strCID       = Request.QueryString["CID"];
        strSCID      = Request.QueryString["SCID"];
        author       = Request.QueryString["Author"];
        strSSCID     = Request.QueryString["SSCID"];
        strPublisher = Request.QueryString["Publisher"];
        location     = Request.QueryString["Location"];
        //string strSSCID = Request.QueryString["SSCID"];

        //TODO:
        //here we need to check the validation of Author and Publisher .
        if (string.IsNullOrEmpty(strPageMode) || string.IsNullOrEmpty(strCID) || string.IsNullOrEmpty(strSCID))
        {
            blnFlag = false;
        }
        else
        {
            if (strPageMode == "0" || strPageMode == "1" || strPageMode == "2" || strPageMode == "3")
            {
                if (strCID == "-1" || strSCID == "-1")
                {
                    blnFlag = false;
                }
                else if (UTLUtilities.IsNumeric(strCID) && UTLUtilities.IsNumeric(strSCID))
                {
                    blnFlag = true;
                }
                else
                {
                    blnFlag = false;
                }
            }
            else
            {
                blnFlag = false;
            }
        }

        if (blnFlag == true)
        {
            intPageMode       = Convert.ToInt32(Request.QueryString["PageMode"]);
            intCategoryID     = Convert.ToInt32(strCID);
            intSubcategoryID  = Convert.ToInt32(strSCID);
            intSecondSubcatID = Convert.ToInt32(strSSCID);
        }
        else
        {
            Response.Redirect("../Default.aspx");
        }
        return(strPageMode);
    }
예제 #15
0
    /// <summary>
    /// Checks the query string.
    /// </summary>
    /// <returns></returns>
    private void CheckQueryString()
    {
        bool blnFlag = false;

        if (Request.QueryString["data"] != null)
        {
            string   strEncryptedUrl = Request.QueryString["data"].ToString();
            string   strDecryptedUrl = UTLUtilities.Decrypt(strEncryptedUrl);
            string[] strSplitUrl     = strDecryptedUrl.Split('&', '=');
            //strUserType = strSplitUrl[1];

            strPageMode = strSplitUrl[1];
            strProductSellerDetailID = strSplitUrl[3];
            strPID   = strSplitUrl[5];
            strCID   = strSplitUrl[7];
            strSCID  = strSplitUrl[9];
            strSSCID = strSplitUrl[11];
        }
        else
        {
            strPageMode = Request.QueryString["PageMode"];
            strPID      = Request.QueryString["PID"];
            strCID      = Request.QueryString["CID"];
            strSCID     = Request.QueryString["SCID"];
            strSSCID    = Request.QueryString["SSCID"];
            strProductSellerDetailID = Request.QueryString["PSID"];
        }


        if (Int32.TryParse(strPID, out intProductID) && Int32.TryParse(strCID, out intCategoryID) && Int32.TryParse(strSCID, out
                                                                                                                    intSubcategoryID) && Int32.TryParse(strSSCID, out intSecondSubcatID) && Int32.TryParse(strPageMode, out intPageMode))
        {
            if (intPageMode == 0)
            {
                blnFlag = true;
            }
            if (intPageMode == 1)
            {
                if (Int32.TryParse(strProductSellerDetailID, out intProductSellerDetailID))
                {
                    blnFlag = true;
                }
                else
                {
                    blnFlag = false;
                }
            }
        }
        else
        {
            if (!blnFlag)
            {
                Response.Redirect("../Default.aspx");
            }
        }
    }
예제 #16
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);
         }
     }
 }
예제 #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string strCategoryID    = "";
        string strSubcategoryID = "";
        bool   success          = true;

        //TODO: This if-else can be removed. Because this Page_Load event fire only after Main pages Page_load events fires.
        if (Session["SELECTED_LOCATION"] != null)
        {
            this.selectedLocation = Session["SELECTED_LOCATION"].ToString();
            intCountryID          = Convert.ToInt32(selectedLocation);
        }

        if (enableControl)
        {
            try
            {
                if (Request.QueryString["data"] != null)
                {
                    string   strEncryptedUrl = Request.QueryString["data"].ToString();
                    string   strDecryptedUrl = UTLUtilities.Decrypt(strEncryptedUrl);
                    string[] strSplitUrl     = strDecryptedUrl.Split('&', '=');
                    strCategoryID    = strSplitUrl[7];
                    strSubcategoryID = strSplitUrl[9];
                }
                else
                {
                    strCategoryID    = Request.QueryString["CID"];
                    strSubcategoryID = Request.QueryString["SCID"];
                }
                intSubcategoryID = Convert.ToInt32(strSubcategoryID);
                intCategoryID    = Convert.ToInt32(strCategoryID);
            }
            catch (Exception exp)
            {
                success = false;
            }
            if (!Page.IsPostBack && success)
            {
                this.LoadList_All_Author();
                this.LoadList_All_Publisher();
                this.LoadList_Top10_Author();
                this.LoadList_Top10_Publisher();
                this.LoadRecord_All_SecondSubcategory();
                this.LoadRecord_Top10_SecondSubcategory();
            }
        }
    }
예제 #18
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;
     }
 }
예제 #19
0
    protected void saveChangeInnerDiscount(object sender, EventArgs e)
    {
        int         rowsCount = GridView2.Rows.Count;
        GridViewRow gridRow;
        TextBox     effectiveDateTextBox;
        TextBox     expirydateTextBox;
        DateTime    effectiveDate;
        DateTime    expirydate;

        DateTimeValidation.Date_Validation dateValidation = new DateTimeValidation.Date_Validation();
        for (int i = 0; i <= rowsCount; i++)
        {
            gridRow              = GridView2.Rows[i];
            strCouponID          = GridView2.DataKeys[i]["CouponID"].ToString();
            strCouponCode        = GridView2.DataKeys[i]["CouponCode"].ToString();
            strProfileIDDiscount = GridView2.DataKeys[i]["ProfileID"].ToString();
            effectiveDateTextBox = (TextBox)gridRow.FindControl("effectiveDateTextBox");
            expirydateTextBox    = (TextBox)gridRow.FindControl("expirydateTextBox");
            if (Int32.TryParse(strCouponID, out intCouponID) && Int32.TryParse(strProfileIDDiscount, out intProfileIDDiscount) && DateTime.TryParse(dateValidation.date_Format_Back_End(effectiveDateTextBox.Text.Trim()), out effectiveDate) && DateTime.TryParse(dateValidation.date_Format_Back_End(expirydateTextBox.Text.Trim()), out expirydate))
            {
                try
                {
                    using (BC_Product bcProduct = new BC_Product())
                    {
                        DateTime EffDate = Convert.ToDateTime(effectiveDate);
                        success = success && bcProduct.Update_DiscounteffectiveDate(intCouponID, intProfileIDDiscount, effectiveDate, expirydate);
                    }
                }
                catch (Exception ex)
                {
                    success = false;
                    lblSystemMessageDiscount.Text = UTLUtilities.ShowErrorMessage("Error:" + ex.Message);
                }
            }
            else
            {
                success = false;
            }
            lblSystemMessageDiscount.Text = success ?
                                            UTLUtilities.ShowSuccessMessage("<br />Your discount date range were successfully updated!<br />") :
                                            UTLUtilities.ShowGeneralMessage("<br />Some Effective Date or Expiry Date updates failed! Please verify your Ads List!<br />");
        }

        this.LoadList_PostedAllDiscount();
    }
예제 #20
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;
        }
    }
예제 #21
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");
        }
    }
예제 #22
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>";
        }
    }
예제 #23
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);
         }
     }
 }
예제 #24
0
    /// <summary>
    /// Checks the query string.
    /// </summary>
    /// <returns></returns>
    private void CheckQueryString()
    {
        if (Request.QueryString["data"] != null)
        {
            string   strEncryptedUrl = Request.QueryString["data"].ToString();
            string   strDecryptedUrl = UTLUtilities.Decrypt(strEncryptedUrl);
            string[] strSplitUrl     = strDecryptedUrl.Split('&', '=');
            strUserType = strSplitUrl[1];
        }
        hfUserType.Value = strUserType;
        if (this.Session["PAYMENT_OPTION"] != null && this.Session["ORDER_ID"] != null)
        {
            strPaymentOption      = this.Session["PAYMENT_OPTION"].ToString();
            hfPaymentOption.Value = strPaymentOption;
            strOrderID            = this.Session["ORDER_ID"].ToString();
            blnFlag = Int32.TryParse(strOrderID, out intOrderID);

            hfOrderID.Value = strOrderID;
        }

        if (string.IsNullOrEmpty(strUserType) && string.IsNullOrEmpty(strPaymentOption) && blnFlag)
        {
            blnFlag = false;
        }
        else
        {
            if (strUserType == "BS" || strUserType == "CL")
            {
                blnFlag = true;
            }
            else
            {
                blnFlag = false;
            }
        }

        if (blnFlag == false)
        {
            Response.Redirect("~/Default.aspx");
        }
    }
예제 #25
0
    protected void btnSend_Click(object sender, EventArgs e)
    {
        int intActionResult = 0;

        intActionResult = this.AddRecord_ProductOrder(Convert.ToInt32(this.ProductID), txtEmail.Text, txtName.Text, txtMessage.Text);

        if (intActionResult > 0)
        {
            this.SendEmail(Convert.ToInt32(this.ProductID));

            lblSystemMessage.Text = UTLUtilities.ShowSuccessMessage("Your message has been sent.");
            this.Clear();
            //Response.Redirect("ItemList_Classifieds.aspx?CID=" + this.CategoryID + "&Location=" + this.Location + "&CMSG=1");

            //Response.Redirect("ItemList_Classifieds.aspx?CID=" + this.CategoryID + "&SCID=" + this.SubcategoryID + "&Location=" + this.Location + "&AdType=" + this.AdvertisementType + "&CMSG=1");
        }
        else
        {
            Response.Redirect("ItemList_Classifieds.aspx?CID=" + this.CategoryID + "&SCID=" + this.SubcategoryID + "&Location=" + this.Location + "&AdType=" + this.AdvertisementType + "&CMSG=0");
        }
    }
예제 #26
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();
        }
    }
예제 #27
0
    protected void ddlCompanyName_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {
            using (BC_Product bc = new BC_Product())
            {
                DataTable dt = new DataTable();
                dt = bc.GetList_BS_PostedAllUserDiscount(Convert.ToInt16(ddlCompanyName.SelectedValue.ToString()));

                if (dt.Rows.Count > 0)
                {
                    GridView2.DataSource = dt;
                    GridView2.DataBind();
                    Total_RecordDiscount = dt.Rows.Count;
                }
                else
                {
                    GridView2.DataSource = null;
                    GridView2.DataBind();

                    lblSystemMessageDiscount.Text  = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" style=\"width:606px; background-color:#3B5998;\">";
                    lblSystemMessageDiscount.Text += "<tr>";
                    lblSystemMessageDiscount.Text += "<td align=\"center\" style=\"height:45px; color:#FFFFFF; font-size:14px; font-weight:bold;\" valign=\"middle\">";
                    lblSystemMessageDiscount.Text += "<span class=\"title\" style=\"font-size:14px;\">";
                    lblSystemMessageDiscount.Text += "</span> You have not posted any Corporate Ads yet.";
                    lblSystemMessageDiscount.Text += "</td>";
                    lblSystemMessageDiscount.Text += "</tr>";
                    lblSystemMessageDiscount.Text += "</table>";
                    lblSystemMessageDiscount.Text  = UTLUtilities.ShowGeneralMessageCP("No Discount posted");
                }
            }
        }
        catch (Exception ex)
        {
            lblSystemMessageDiscount.Text = ex.Message.ToString();
        }
    }
예제 #28
0
 private void CheckQueryString()
 {
     try
     {
         if (Request.QueryString["data"] != null)
         {
             string   strEncryptedUrl = Request.QueryString["data"].ToString();
             string   strDecryptedUrl = UTLUtilities.Decrypt(strEncryptedUrl);
             string[] strSplitUrl     = strDecryptedUrl.Split('&', '=');
             strOrderID       = strSplitUrl[1];
             strProfileID     = strSplitUrl[3];
             userType         = strSplitUrl[5] == "BS" ? true : false;;
             strPaymentOption = strSplitUrl[7];
             //strPaymentOption = Server.UrlDecode(strSplitUrl[7]);
             strTotalAmount = strSplitUrl[9];
             strCurrency    = strSplitUrl[11];
         }
         //strOrderID = Request.QueryString["oi"];
         //strProfileID = Request.QueryString["pfi"];
         //strPaymentOption = Server.UrlDecode(Request.QueryString["po"]);
         //strTotalAmount = Request.QueryString["total"];
         //strCurrency = Request.QueryString["curr"];
         //userType = Request.QueryString["ut"].ToString() == "BS" ? true : false;
         if (!string.IsNullOrEmpty(strOrderID) || !UTLUtilities.IsNumeric(strOrderID))
         {
             blnFlag = true;
         }
         else
         {
             blnFlag = false;
         }
     }
     catch (Exception ex)
     {
         lblSystemMessage.Text = "Error: " + ex.Message;
     }
 }
예제 #29
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();
        }
    }
예제 #30
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();
        }
    }