Exemplo n.º 1
0
    private void UpdateActivationStatusClassified(int ProductID)
    {
        try
        {
            using (BC_Product bcProduct = new BC_Product())
            {
                int efectedRow = bcProduct.Update_ActivationStatusClassified(ProductID);

                if (efectedRow > 0)
                {
                    if (FilterClassified == FilterTypeClassified.ClassifiedByDateRange)
                    {
                        this.LoadList_Posted_ClassifiedProduct(Convert.ToDateTime(txtFromDate.Text), Convert.ToDateTime(txtToDate.Text));
                    }
                    else if (FilterClassified == FilterTypeClassified.ClassifiedAll && ddlClassifiedCategory.SelectedValue != "-1")
                    {
                        this.LoadList_Posted_AllClassifiedProduct();
                    }
                    else if (FilterClassified == FilterTypeClassified.ClassifiedByCategory && ddlClassifiedCategory.SelectedValue != "-1")
                    {
                        this.LoadList_PostedClassifiedProductByCategory(Convert.ToInt32(ddlClassifiedCategory.SelectedValue.ToString()));
                    }

                    else
                    {
                        this.LoadList_Posted_AllClassifiedProduct();
                    }
                }
            }
        }
        catch (Exception Exp)
        {
            //lblCorporateMessage.Text = "Error: " + Exp.Message;
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// Returns true if Master seller's given product title already exists.
    /// </summary>
    private bool Check_IsMasterProductDuplicate()
    {
        bool blnFlag = true;

        if (Int32.TryParse(ddlCategory.SelectedValue, out intCategoryID) && Int32.TryParse(ddlSubcategory.SelectedValue, out intSubcategoryID) &&
            Int32.TryParse(ddl2ndSubCategory.SelectedValue, out intSecondSubcatID))
        {
            try
            {
                using (BC_Product bcProduct = new BC_Product())
                {
                    if (ddlCategory.SelectedValue != "1")
                    {
                        int _ProductModelID = Convert.ToInt32(ddlModel.SelectedValue);
                        blnFlag = bcProduct.IsMaster_OtherTitle_Dupllicate(intCategoryID, intSubcategoryID, intSecondSubcatID, _ProductModelID, txtTitle.Text);
                    }
                    else
                    {
                        blnFlag = bcProduct.IsMaster_ProductTitle_Dupllicate(intCategoryID, intSubcategoryID, intSecondSubcatID, txtTitle.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                lblSystemMessage.Text = ex.Message;
            }
        }
        return(blnFlag);
    }
Exemplo n.º 3
0
    private void LoadList_PostedClassifiedProductByCategory(int intCategoryID)
    {
        try
        {
            using (BC_Product bc = new BC_Product())
            {
                DataTable dt = new DataTable();
                dt = bc.GetList_CL_PostedProductByCategory(intProfileID, intCategoryID);
                if (dt.Rows.Count > 0)
                {
                    grvClassifiedProduct.DataSource = dt;
                    grvClassifiedProduct.DataBind();
                }
                else
                {
                    grvClassifiedProduct.DataSource = null;
                    grvClassifiedProduct.DataBind();

                    lblClassifiedMessage.Text  = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" style=\"width:606px; background-color:#3B5998;\">";
                    lblClassifiedMessage.Text += "<tr>";
                    lblClassifiedMessage.Text += "<td align=\"center\" style=\"height:45px; color:#FFFFFF; font-size:14px; font-weight:bold;\" valign=\"middle\">";
                    lblClassifiedMessage.Text += "<span class=\"title\" style=\"font-size:14px;\">";
                    lblClassifiedMessage.Text += "</span> You have not posted any Classified Ads yet.";
                    lblClassifiedMessage.Text += "</td>";
                    lblClassifiedMessage.Text += "</tr>";
                    lblClassifiedMessage.Text += "</table>";
                    //lblClassifiedMessage.Text = "You have not posted any Classified Ads yet.";
                }
            }
        }
        catch (Exception ex)
        {
            //lblCorporateMessage.Text = ex.Message.ToString();
        }
    }
Exemplo n.º 4
0
    /// <summary>
    /// Loads all  Corporate Product Order detail that this specific user has placed.
    /// </summary>
    /// <param name="intProfileID"></param>
    /// <param name="userType"></param>
    private void LoadList_PlacedOrder_Corporate_Product()
    {
        try
        {
            using (BC_Product bcProduct = new BC_Product())
            {
                DataTable dt = bcProduct.LoadList_PlacedOrder_CorporateProduct(intProfileID, _BusinessUser);

                if (dt.Rows.Count > 0)
                {
                    grvCorporateOrderList.DataSource = dt;
                    grvCorporateOrderList.DataBind();
                }
                else
                {
                    lblCorporateOrderMessage.Text  = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" style=\"width:606px; background-color:#3B5998;\">";
                    lblCorporateOrderMessage.Text += "<tr>";
                    lblCorporateOrderMessage.Text += "<td align=\"center\" style=\"height:45px; color:#FFFFFF; font-size:14px; font-weight:bold;\" valign=\"middle\">";
                    lblCorporateOrderMessage.Text += "<span class=\"title\" style=\"font-size:14px;\">";
                    lblCorporateOrderMessage.Text += "</span> You have not placed any Corporate Product order yet.";
                    lblCorporateOrderMessage.Text += "</td>";
                    lblCorporateOrderMessage.Text += "</tr>";
                    lblCorporateOrderMessage.Text += "</table>";
                    //lblCorporateOrderMessage.Text = "You have not placed any Corporate Product order yet.";
                }
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = "Error: " + Exp.Message;
        }
    }
Exemplo n.º 5
0
    /// <summary>
    /// Loads all Corporate posted products.
    /// </summary>



    private void Load_CL_Categories()
    {
        try
        {
            using (BC_Product bcProductProfile = new BC_Product())
            {
                DataTable dt = bcProductProfile.Load_CL_Categories();
                if (dt.Rows.Count > 0)
                {
                    ddlClassifiedCategory.DataSource     = dt;
                    ddlClassifiedCategory.DataValueField = "CategoryID";
                    ddlClassifiedCategory.DataTextField  = "Category";
                    ddlClassifiedCategory.DataBind();
                }
                else
                {
                    //lblCorporateMessage.Text = "No Category available";
                }
            }
        }
        catch (Exception Exp)
        {
            //lblCorporateMessage.Text = Exp.Message.ToString();
        }
    }
Exemplo n.º 6
0
    /// <summary>
    /// Loads grvProduct with all the product title from the database,
    /// that matches with the user provided product title. Returns true if any matches occur.
    /// </summary>
    private bool LoadList_Product()
    {
        bool blnFlag = false;

        intCategoryID     = Convert.ToInt32(ddlCategory.SelectedValue);
        intSubcategoryID  = Convert.ToInt32(ddlSubcategory.SelectedValue);
        intSecondSubcatID = Convert.ToInt32(ddl2ndSubCategory.SelectedValue);
        try
        {
            using (BC_Product bcProduct = new BC_Product())
            {
                dtProduct = new DataTable();
                dtProduct = bcProduct.GetList_ProductTitle(intCategoryID, intSubcategoryID, intSecondSubcatID, txtTitle.Text);
                if (dtProduct.Rows.Count > 0)
                {
                    grvProduct.DataSource = dtProduct;
                    grvProduct.DataBind();
                    blnFlag = true;
                }
                else
                {
                    grvProduct.DataSource = null;
                    grvProduct.DataBind();
                    blnFlag = false;
                }
            }
        }
        catch (Exception ex)
        {
            lblSystemMessage.Text = ex.Message;
        }
        return(blnFlag);
    }
Exemplo n.º 7
0
 private void LoadList_PostedProduct()
 {
     try
     {
         using (BC_Product bc = new BC_Product())
         {
             DataTable dt = new DataTable();
             dt = bc.GetList_BS_PostedProduct(intProfileID, _BusinessUser);
             if (dt.Rows.Count > 0)
             {
                 grvProductProfile.DataSource = dt;
                 grvProductProfile.DataBind();
             }
             else
             {
                 lblSystemMessage.Text  = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" style=\"width:606px; background-color:#3B5998;\">";
                 lblSystemMessage.Text += "<tr>";
                 lblSystemMessage.Text += "<td align=\"center\" style=\"height:45px; color:#FFFFFF; font-size:14px; font-weight:bold;\" valign=\"middle\">";
                 lblSystemMessage.Text += "<span class=\"title\" style=\"font-size:14px;\">";
                 lblSystemMessage.Text += "</span> You have not posted any Corporate Ads yet.";
                 lblSystemMessage.Text += "</td>";
                 lblSystemMessage.Text += "</tr>";
                 lblSystemMessage.Text += "</table>";
                 //lblSystemMessage.Text = "No previously posted ad found.";
             }
         }
     }
     catch (Exception ex)
     {
         lblSystemMessage.Text = ex.Message.ToString();
     }
 }
Exemplo n.º 8
0
    /// <summary>
    /// Loads Buyers information.
    /// </summary>
    /// <param name="intProfleID"></param>
    /// <param name="userType"></param>
    private void LoadRecord_Buyer_Information(int intProfileID, bool userType)
    {
        try
        {
            using (BC_Product bcProduct = new BC_Product())
            {
                dtBuyerInformation = bcProduct.LoadProduct_Buyer_Information(intProfileID, userType);
                if (dtBuyerInformation.Rows.Count > 0)
                {
                    strBuyerInfo = string.Empty;
                    strBuyerName = dtBuyerInformation.Rows[0]["UserName"].ToString();

                    strBuyerInfo += "Dear " + dtBuyerInformation.Rows[0]["UserName"].ToString() + ",";
                    lblBuyer.Text = strBuyerInfo;

                    strBuyerInfo = string.Empty;

                    strBuyerInfo += "<div style=\"line-height:18px;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\">Name: </strong>";
                    }

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

                    if (userType == _BusinessUser)
                    {
                        strBuyerInfo += "<strong style=\"font-size:12px;font-family:verdana\">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>";

                    lblShippingAddress.Text = strBuyerInfo;
                    lblBillingAddress.Text  = strBuyerInfo;
                }
            }
        }
        catch (Exception ex)
        {
            lblSystemMessage.Text = "Error: " + ex.Message;
        }
    }
    /// <summary>
    /// Selects PaperBackForBook,DimensionForBook, ShippingWeight,ISBN, Author,Publisher,
    ///	Edition and CanEditProduct from Product_Master_Book table.
    /// For Tag users. Will be used in case of Editing a book.
    /// USP: USP_CP_Select_Specific_BookRecord
    /// </summary>
    /// <param name="categoryID"></param>
    /// <param name="subcategoryID"></param>
    /// <param name="secondSubcatID"></param>
    /// <param name="productID"></param>
    /// <param name="profileID"></param>
    private void Select_BookRecord(int categoryID, int subcategoryID, int secondSubcatID, int productID, int profileID)
    {
        DataTable dt              = new DataTable();
        string    strIsActive     = null;
        bool      _BusinessSeller = true;

        try
        {
            using (BC_Product bcProduct = new BC_Product())
            {
                dt = bcProduct.Select_BookRecord(categoryID, subcategoryID, secondSubcatID, profileID, productID, _BusinessSeller);
                if (dt.Rows.Count > 0)
                {
                    txtPaperBack.Text        = dt.Rows[0]["PaperBackForBook"].ToString();
                    txtLanguage.Text         = dt.Rows[0]["Language"].ToString();
                    txtDimensionForBook.Text = dt.Rows[0]["DimensionForBook"].ToString();
                    txtShippingWeight.Text   = dt.Rows[0]["ShippingWeight"].ToString();
                    txtISBN.Text             = dt.Rows[0]["ISBN"].ToString();
                    txtAuthor.Text           = dt.Rows[0]["Author"].ToString();
                    txtPublisher.Text        = dt.Rows[0]["Publisher"].ToString();
                    txtEdition.Text          = dt.Rows[0]["Edition"].ToString();
                    txtCanEdit.Text          = dt.Rows[0]["CanEditProduct"].ToString();
                    strIsActive                    = dt.Rows[0]["IsActive"].ToString();
                    chkIsActive.Checked            = (strIsActive == "True") ? selected : unSelected;
                    ddlPaymentOption.SelectedValue = dt.Rows[0]["PaymentOption"].ToString();
                    txtImagePath.Text              = dt.Rows[0]["ProductImage"].ToString();
                    //if (dt.Rows[0]["ProductImage"].ToString() == "../Corporate_ProductImage/default.png")
                    //{
                    //    lblIsFileUploaded.Text = "true";
                    //}
                    //else
                    //{
                    //    lblIsFileUploaded.Text = "false";
                    //}

                    if (ddlPaymentOption.SelectedValue == "COD")
                    {
                        panelDeliveryOption.Visible       = true;
                        panelDeliveryOption.Enabled       = true;
                        txtCODCost.Text                   = dt.Rows[0]["CodCost"].ToString();
                        ddlDeliveryArea.SelectedItem.Text = dt.Rows[0]["DeliveryArea"].ToString();
                    }
                    else
                    {
                        panelDeliveryOption.Visible = false;
                        panelDeliveryOption.Enabled = false;
                    }
                }
            }
        }
        catch (Exception ex)
        {
            lblSystemMessage.Text = ex.Message;
        }
    }
Exemplo n.º 10
0
    /// <summary>
    /// Returns true if Tag seller already tagged this product.
    /// </summary>
    /// <returns></returns>
    private bool Is_Seller_Tagged_Once(int intProductID, int intProfileID, bool sellerType)
    {
        bool blnFlag = false;

        try
        {
            using (BC_Product bcProduct = new BC_Product())
            {
                blnFlag = bcProduct.Is_Seller_Tagged_Once(intProfileID, intProductID, sellerType);
            }
        }
        catch (Exception ex)
        {
            lblSystemMessage.Text = ex.Message;
        }
        return(blnFlag);
    }
Exemplo n.º 11
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();
    }
Exemplo n.º 12
0
 private void UpdateActivationStatusDiscount(int CouponID, int ProfileID, string CouponCode)
 {
     try
     {
         using (BC_Product bcProduct = new BC_Product())
         {
             int efectedRow = bcProduct.Update_ActivationStatusDiscount(CouponID, ProfileID, CouponCode);
             if (efectedRow > 0)
             {
                 this.LoadList_PostedAllDiscount();
             }
         }
     }
     catch (Exception Exp)
     {
         lblSystemMessageDiscount.Text = "Error: " + Exp.Message;
     }
 }
Exemplo n.º 13
0
    /// <summary>
    /// Adds comments on book in ProductReview_Books table.
    /// USP: Previous: USP_CP_ProdReview_Books_InsertRecord
    /// USP: New: USP_Common_ItemDetail_InsertReview
    /// </summary>
    /// <param name="intProductSellerDetailID"></param>
    /// <param name="intProductID"></param>
    /// <param name="intCategoryID"></param>
    /// <param name="strCriticsName"></param>
    /// <param name="strReview"></param>
    /// <returns></returns>
    private int AddRecord_ProductReview(int intProductSellerDetailID, int intProductID, int intCategoryID, string strCriticsName, string strReview)
    {
        int intActionStatus = 0;

        try
        {
            using (BC_Product bcProduct = new BC_Product())
            {
                intActionStatus = bcProduct.Insert_ProductReview(intProductSellerDetailID, intProductID, intCategoryID, strCriticsName, strReview);
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }

        return(intActionStatus);
    }
Exemplo n.º 14
0
 /// <summary>
 /// Loads Product Review.
 /// USP: USP_Common_ItemDetail_LoadList_ProductReview
 /// </summary>
 /// <param name="intProfileID"></param>
 /// <param name="intProductID"></param>
 /// <param name="intCateogryID"></param>
 private void LoadRecord_ProductReview(int intProductSellerDetailID, int intProductID, int intCateogryID)
 {
     try
     {
         using (BC_Product bcProduct = new BC_Product())
         {
             DataTable dtReview = bcProduct.LoadList_ProductReview(intProductSellerDetailID, intProductID, intCategoryID);
             Repeater1.DataSource = null;
             Repeater1.DataBind();
             if (dtReview.Rows.Count > 0)
             {
                 Repeater1.DataSource = dtReview;
                 Repeater1.DataBind();
             }
         }
     }
     catch (Exception Exp)
     {
         lblSystemMessage.Text = Exp.Message.ToString();
     }
 }
Exemplo n.º 15
0
 /// <summary>
 /// Loads Buyer's Ordered item's with related Seller's information.
 /// </summary>
 private void PopulateControls()
 {
     try
     {
         using (BC_Product bcProduct = new BC_Product())
         {
             dtOrderedItems = new DataTable();
             dtOrderedItems = bcProduct.LoadList_Product_Seller_Information(intOrderID);
             if (dtOrderedItems.Rows.Count > 0)
             {
                 lblTotalAmount.Text  = string.Empty;
                 lblTotalAmount.Text  = "<span class=\"price\">";
                 lblTotalAmount.Text += dtOrderedItems.Rows[0]["TotalAmount"].ToString();
                 lblTotalAmount.Text += "</span>";
                 lblCurrency.Text     = string.Empty;
                 lblCurrency.Text     = "<span class=\"price\">";
                 lblCurrency.Text    += dtOrderedItems.Rows[0]["Currency"].ToString();
                 lblCurrency.Text    += "</span>";
                 success              = true;
             }
         }
     }
     catch (Exception ex)
     {
         lblSystemMessage.Text = "Error:" + ex.Message;
     }
     // if the shopping cart is empty...
     if (dtOrderedItems.Rows.Count == 0)
     {
         grvOrderedItems.Visible = false;
         lblTotalAmount.Text     = "";
         lblCurrency.Text        = "";
     }
     else
     {
         grvOrderedItems.DataSource = dtOrderedItems;
         grvOrderedItems.DataBind();
         grvOrderedItems.Visible = true;
     }
 }
 private void Load_CL_Categories()
 {
     try
     {
         using (BC_Product bcProductProfile = new BC_Product())
         {
             DataTable dt = bcProductProfile.Load_CL_Categories();
             if (dt.Rows.Count > 0)
             {
                 grvClassifiedCategory.DataSource = dt;
                 grvClassifiedCategory.DataBind();
             }
             else
             {
                 lblSystemMessage.Text = "No Category available";
             }
         }
     }
     catch (Exception Exp)
     {
         lblSystemMessage.Text = Exp.Message.ToString();
     }
 }
    /// <summary>
    /// Selects ISBN, Author, Publisher name from Product_Master_Book table.
    /// For Tag users. Will be used in case of Adding a book.
    /// USP: USP_CP_Get_MasterBookRecord
    /// </summary>
    /// <param name="categoryID"></param>
    /// <param name="subcategoryID"></param>
    /// <param name="secondSubcatID"></param>
    /// <param name="profileID"></param>
    /// <param name="productID"></param>
    private void Select_MasterBookRecord(int categoryID, int subcategoryID, int secondSubcatID, int profileID, int productID)
    {
        DataTable dt = new DataTable();

        try
        {
            using (BC_Product bcProduct = new BC_Product())
            {
                dt = bcProduct.SelectSpecific_MasterBookRecord(categoryID, subcategoryID, secondSubcatID, productID);
                if (dt.Rows.Count > 0)
                {
                    txtISBN.Text      = dt.Rows[0]["ISBN"].ToString();
                    txtAuthor.Text    = dt.Rows[0]["Author"].ToString();
                    txtPublisher.Text = dt.Rows[0]["Publisher"].ToString();
                    txtEdition.Text   = dt.Rows[0]["Edition"].ToString();
                }
            }
        }
        catch (Exception ex)
        {
            lblSystemMessage.Text = ex.Message;
        }
    }
Exemplo n.º 18
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();
        }
    }
    /// <summary>
    /// Increments a products HitCounterField.
    /// </summary>
    /// <param name="objProduct"></param>
    /// <returns></returns>
    public bool IncrementProductCounter(CommonProduct objProduct)
    {
        int _ActionResult = -1;

        if (!this.IsAlreadyUpdated(objProduct))
        {
            try
            {
                using (BC_Product product = new BC_Product())
                {
                    _ActionResult = product.IncrementProductCounter(objProduct);
                    if (_ActionResult > 0)
                    {
                        this.KeepTrackOfHitCounter(objProduct);
                    }
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
        return(_ActionResult > 0 ? true : false);
    }
Exemplo n.º 20
0
    private void LoadList_PostedAllInActiveProductCounter()
    {
        try
        {
            using (BC_Product bc = new BC_Product())
            {
                DataTable dt = new DataTable();
                dt = bc.GetList_BS_PostedAllUserInActiveProductCount(intProfileID);

                if (dt.Rows.Count > 0)
                {
                    TotalInActiveProductAds = dt.Rows[0]["AllActiveAdd"].ToString();
                }
                else
                {
                    TotalInActiveProductAds = "0";
                }
            }
        }
        catch (Exception ex)
        {
            //lblCorporateMessage.Text = ex.Message.ToString();
        }
    }
Exemplo n.º 21
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;
        }
    }