private void SendEmail(int _ProductID) { string mailMessage = string.Empty; try { using (BOC_Classifieds_Orders bocProductOrder = new BOC_Classifieds_Orders()) { EOC_PropertyBean eocProduct = new EOC_PropertyBean(); eocProduct.Classifieds_ProductProfile_ProductID = _ProductID; dtOrder = bocProductOrder.LoadList_Information_ClassifiedProducts(eocProduct); if (dtOrder.Rows.Count > 0) { string strUrlContactSeller = Request.Url.ToString(); this.SendSeller_ConfirmationMail(dtOrder.Rows[0]["AdvertiserName"].ToString(), dtOrder.Rows[0]["LoginEmail"].ToString(), dtOrder, strUrlContactSeller); this.SendBuyer_ConfirmationMail(txtName.Text, txtEmail.Text, dtOrder, strUrlContactSeller); } else { lblSystemMessage.Text = "Mail can't send. Amount is not fully received."; } } } catch (Exception Exp) { Response.Write(Exp.Message.ToString()); } }
private int AddRecord_ProductOrder(int intProductID, string strCustomerEmail, string strCustomerName, string strCustomerMessage) { int intActionStatus = 0; try { using (BOC_Classifieds_Orders bocProductOrder = new BOC_Classifieds_Orders()) { EOC_PropertyBean eocProduct = new EOC_PropertyBean(); eocProduct.Classifieds_ProductProfile_ProductID = intProductID; eocProduct.Classifieds_OrderDetail_CustomerEmail = strCustomerEmail; eocProduct.Classifieds_OrderDetail_CustomerName = strCustomerName; eocProduct.Classifieds_OrderDetail_CustomerMessage = strCustomerMessage; //eocProduct.UpdatedOn = DateTime.Now; intActionStatus = bocProductOrder.AddRecord_ProductOrder(eocProduct); } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } return(intActionStatus); }
private void LoadRecord_ProductList(int intSubcategoryID, string strCountry, string strAdvertisementType) { try { using (BOC_Classifieds_Orders bocProductProfile = new BOC_Classifieds_Orders()) { EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean(); eocPropertyBean.Subcategory_SubcategoryID = intSubcategoryID; eocPropertyBean.Country_CountryName = strCountry; dtProductList = new DataTable(); dtProductList = bocProductProfile.LoadRecord_ProductList_Classifieds(eocPropertyBean); FilterType = Filter.BySubcategory; if (dtProductList.Rows.Count > 0) { this.InitializeGridView(dtProductList); } else { this.EmptyGridView(); } } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } }
/// <summary> /// Loads All Classified Item List, After initiating from left menu or Home page. /// </summary> /// <param name="intCategoryID"></param> private void LoadRecord_ProductList_By_Category(int intCategoryID) { try { using (BOC_Classifieds_Orders bocProductProfile = new BOC_Classifieds_Orders()) { EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean(); eocPropertyBean.Subcategory_CategoryID = intCategoryID; dtProductList = new DataTable(); dtProductList = bocProductProfile.LoadRecord_ProductList_Classifieds_By_Category(eocPropertyBean); //FilterNo = Filter.ByCategory.ToString(); FilterType = Filter.ByCategory; if (dtProductList.Rows.Count > 0) { this.InitializeGridView(dtProductList); } else { this.EmptyGridView(); } } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } }
/// <summary> /// Loads List of Subcategory For Dropdownlist /// </summary> /// <param name="intCategoryID"></param> private void LoadRecord_Subcategory(int intCategoryID) { try { using (BOC_Classifieds_Orders bocProductProfile = new BOC_Classifieds_Orders()) { EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean(); eocPropertyBean.Category_CategoryID = intCategoryID; DataTable dtSubcategory = bocProductProfile.LoadRecord_Subcategory(eocPropertyBean); if (dtSubcategory.Rows.Count > 0) { //DropDownList ddlSubcategory = new DropDownList(); if (dtSubcategory.Rows.Count == 1) { ddlSubcategory.DataSource = dtSubcategory; ddlSubcategory.DataValueField = "SubcategoryID"; ddlSubcategory.DataTextField = "Subcategory"; ddlSubcategory.DataBind(); pnlSubcategory.Visible = false; } else { ddlSubcategory.Items.Clear(); ddlSubcategory.Items.Add(new ListItem("All", "-1")); ddlSubcategory.DataSource = dtSubcategory; ddlSubcategory.DataValueField = "SubcategoryID"; ddlSubcategory.DataTextField = "Subcategory"; ddlSubcategory.DataBind(); pnlSubcategory.Visible = true; } } } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } }
private void LoadRecord_ProductReview(int intProductID) { try { using (BOC_Classifieds_Orders bocProductReview = new BOC_Classifieds_Orders()) { EOC_PropertyBean eocReview = new EOC_PropertyBean(); eocReview.Classifieds_ProductProfile_ProductID = intProductID; DataTable dtReview = bocProductReview.LoadRecord_ProductReview(eocReview); if (dtReview.Rows.Count > 0) { Repeater1.DataSource = dtReview; Repeater1.DataBind(); } } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } }
private int AddRecord_ProductReview(int intProductID, string strCriticsName, string strReview) { int intActionStatus = 0; try { using (BOC_Classifieds_Orders bocProductReview = new BOC_Classifieds_Orders()) { EOC_PropertyBean eocReview = new EOC_PropertyBean(); eocReview.Classifieds_ProductProfile_ProductID = intProductID; eocReview.ProductReview_Classified_CriticsName = strCriticsName; eocReview.ProductReview_Classified_Review = strReview; intActionStatus = bocProductReview.AddRecord_ProductReview(eocReview); } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } return(intActionStatus); }
private bool SelectRecord_ProductProfile(int intProductID, int intProfileID) { bool blnFlag = false; try { using (BOC_Classifieds_Orders bocProductProfile = new BOC_Classifieds_Orders()) { EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean(); eocPropertyBean.Classifieds_ProductProfile_ProductID = intProductID; eocPropertyBean.Classifieds_UserProfile_ProfileID = intProfileID; dtProductProfile = bocProductProfile.SelectRecord_ProductProfile_Classifieds(eocPropertyBean); if (dtProductProfile.Rows.Count > 0) { blnFlag = true; string strAlternatePrice = dtProductProfile.Rows[0]["AlternatePriceOffer"].ToString(); string strCurrency = dtProductProfile.Rows[0]["Currency"].ToString(); //lblPricingOffer.Text = String.Format("{0:#,###}", dtProductProfile.Rows[0]["SalePrice"]); if (strAlternatePrice == "-1") { lblPricingOffer.Text = "Price (Not Available)"; } else if (strAlternatePrice == "1") { lblPricingOffer.Text = "Best Offer (" + strCurrency + " " + String.Format("{0:#,###}", dtProductProfile.Rows[0]["SalePrice"]) + ")"; } else if (strAlternatePrice == "2") { lblPricingOffer.Text = "Please Contact"; } else if (strAlternatePrice == "3") { lblPricingOffer.Text = "Exchange"; } else if (strAlternatePrice == "4") { lblPricingOffer.Text = "Free"; } else if (strAlternatePrice == "5") { lblPricingOffer.Text = "Fixed (" + strCurrency + " " + String.Format("{0:#,###}", dtProductProfile.Rows[0]["SalePrice"]) + ")"; } else if (strAlternatePrice == "6") { lblPricingOffer.Text = "Negotiable (" + strCurrency + " " + String.Format("{0:#,###}", dtProductProfile.Rows[0]["SalePrice"]) + ")"; } else { lblPricingOffer.Text = "Price (" + strCurrency + " " + String.Format("{0:#,###}", dtProductProfile.Rows[0]["SalePrice"]) + ")"; } } } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } return(blnFlag); }