public DataTable SellLead_Set01_BuyerList_Books(EOC_PropertyBean eocPropertyBean) { try { ArrayList arlSQLParameters = new ArrayList(); arlSQLParameters.Add(new SqlParameter("@ProfileID", eocPropertyBean.Business_UserProfile_ProfileID.ToString())); arlSQLParameters.Add(new SqlParameter("@FromDate", eocPropertyBean.FromDate.ToString())); arlSQLParameters.Add(new SqlParameter("@ToDate", eocPropertyBean.ToDate.ToString())); return(this.ExecuteQuery("USP_CP_SellLead_Set01_BuyerList_Books", arlSQLParameters)); } catch { throw; } }
public DataTable GetSellerDetail(EOC_PropertyBean bean) { DataTable dt = null; try { ArrayList arlSQLParameters = new ArrayList(); arlSQLParameters.Add(new SqlParameter("@ProfileID", bean.Business_UserProfile_ProfileID.ToString())); dt = this.ExecuteQuery("USP_CP_LoadSpecificSellerInfo", arlSQLParameters); } catch { throw; } return(dt); }
/// <summary> /// Select specific row from the table Business_ActivationLinks /// </summary> /// <param name="eocPropertyBean">EOC_PropertyBean</param> /// <returns>DataTable</returns> public DataTable SelectRecord_ActivationLinks(EOC_PropertyBean eocPropertyBean) { DataTable dtActivationLink = null; try { ArrayList arlSQLParameters = new ArrayList(); arlSQLParameters.Add(new SqlParameter("@LoginEmail", eocPropertyBean.Business_UserProfile_LoginEmail)); dtActivationLink = this.ExecuteQuery("USP_CP_ActLink_01_SelectActLink", arlSQLParameters); } catch { throw; } return(dtActivationLink); }
private void IsLoginValid() { try { using (BOC_Classifieds_UserProfile bocUserProfile = new BOC_Classifieds_UserProfile()) { EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean(); eocPropertyBean.Classifieds_UserProfile_LoginEmail = txtLoginEmail.Text; eocPropertyBean.Classifieds_UserProfile_LoginPassword = txtPassword.Text; if (!bocUserProfile.IsLoginValid(eocPropertyBean)) { lblSystemMessage.Text = "Access denied! Invalid Login Email or Password."; } else { if (!eocPropertyBean.Classifieds_UserProfile_IsActive) { lblSystemMessage.Text = "Your classified account is not active."; } else { this.Session.Clear(); this.Session["CLSF_PROFILE_CODE"] = eocPropertyBean.Classifieds_UserProfile_ProfileID.ToString(); this.Session["CLSF_COUNTRY_CODE"] = eocPropertyBean.Country_CountryID.ToString(); this.Session["IS_ADMIN"] = eocPropertyBean.IsAdmin; this.Session["COUNTRY"] = eocPropertyBean.Country_CountryName; this.Session["LOGINEMAIL"] = eocPropertyBean.Classifieds_UserProfile_LoginEmail; this.Session["ADVERTISERNAME"] = eocPropertyBean.Classifieds_UserProfile_AdvertiserName; //this.Session["CLSF_PROVINCE_CODE"] = eocPropertyBean.Province_ProvinceID.ToString(); Response.Redirect("ControlPanel.aspx", false); } } } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } }
/// <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(); } }
public int UpdateRecord_ProductProfile(EOC_PropertyBean eocPropertyBean) { int intActionResult = 0; string strOutputValue = string.Empty; try { ArrayList arlSQLParameters = new ArrayList(); arlSQLParameters.Add(new SqlParameter("@ProductID", eocPropertyBean.Business_ProductProfile_Books_ProductID.ToString())); arlSQLParameters.Add(new SqlParameter("@ProfileID", eocPropertyBean.Business_UserProfile_ProfileID.ToString())); arlSQLParameters.Add(new SqlParameter("@SubcategoryID", eocPropertyBean.Subcategory_SubcategoryID.ToString())); arlSQLParameters.Add(new SqlParameter("@SKU", eocPropertyBean.Business_ProductProfile_Books_SKU)); arlSQLParameters.Add(new SqlParameter("@BookTitle", eocPropertyBean.Business_ProductProfile_Books_BookTitle)); arlSQLParameters.Add(new SqlParameter("@Author", eocPropertyBean.Business_ProductProfile_Books_Author)); arlSQLParameters.Add(new SqlParameter("@Publisher", eocPropertyBean.Business_ProductProfile_Books_Publisher)); arlSQLParameters.Add(new SqlParameter("@ISBN", eocPropertyBean.Business_ProductProfile_Books_ISBN)); arlSQLParameters.Add(new SqlParameter("@Edition", eocPropertyBean.Business_ProductProfile_Books_Edition)); arlSQLParameters.Add(new SqlParameter("@BookDescription", eocPropertyBean.Business_ProductProfile_Description)); arlSQLParameters.Add(new SqlParameter("@Quantity", eocPropertyBean.Business_ProductProfile_Quantity.ToString())); arlSQLParameters.Add(new SqlParameter("@ProductImage", eocPropertyBean.Business_ProductProfile_Books_ProductImage)); arlSQLParameters.Add(new SqlParameter("@Currency", eocPropertyBean.Business_ProductProfile_Books_Currency)); arlSQLParameters.Add(new SqlParameter("@ProductPrice", eocPropertyBean.Business_ProductProfile_Books_ProductPrice)); arlSQLParameters.Add(new SqlParameter("@SalePrice", eocPropertyBean.Business_ProductProfile_Books_SalePrice)); arlSQLParameters.Add(new SqlParameter("@CashOnDeliveryCost", eocPropertyBean.Business_ProductProfile_Books_CashOnDeliveryCost)); arlSQLParameters.Add(new SqlParameter("@PaymentOption", eocPropertyBean.Business_ProductProfile_Books_PaymentOption)); arlSQLParameters.Add(new SqlParameter("@StartDate", eocPropertyBean.Business_ProductProfile_Books_StartDate.ToString())); arlSQLParameters.Add(new SqlParameter("@EndDate", eocPropertyBean.Business_ProductProfile_Books_EndDate.ToString())); arlSQLParameters.Add(new SqlParameter("@UpdatedOn", eocPropertyBean.UpdatedOn.ToString())); arlSQLParameters.Add(new SqlParameter("@DeliveryArea", eocPropertyBean.Business_ProductProfile_General_DeliveryArea)); arlSQLParameters.Add(new SqlParameter("@SecBookSubcategoryID", eocPropertyBean.Business_ProductProfile_Books_2ndSubCategoryID)); intActionResult = this.ExecuteActionQuery("USP_CP_ProdProf_Books_UpdateRecord", arlSQLParameters, "@ProductIDValue"); } catch { throw; } return(intActionResult); }
public int UpdateRecord_ProductImage(EOC_PropertyBean eocPropertyBean) { int intActionResult = 0; try { ArrayList arlSQLParameters = new ArrayList(); arlSQLParameters.Add(new SqlParameter("@ProductImage", eocPropertyBean.Business_ProductProfile_Books_ProductImage)); arlSQLParameters.Add(new SqlParameter("@ProductID", eocPropertyBean.Business_ProductProfile_Books_ProductID.ToString())); intActionResult = this.ExecuteActionQuery("USP_CP_ProdProf_Books_UpdateRecord_ImageInfo", arlSQLParameters); } catch { throw; } return(intActionResult); }
public bool BeforeInsert_IsProductModel_Duplicate(EOC_PropertyBean eocPropertyBean) { DataTable dt = null; try { ArrayList arlSQLParameters = new ArrayList(); arlSQLParameters.Add(new SqlParameter("@ProductModel", eocPropertyBean.ProductModel)); arlSQLParameters.Add(new SqlParameter("@CategoryID", eocPropertyBean.Category_CategoryID)); arlSQLParameters.Add(new SqlParameter("@SubcategoryID", eocPropertyBean.Subcategory_SubcategoryID)); arlSQLParameters.Add(new SqlParameter("@SecondSubcatID", eocPropertyBean.SecondSubcatID)); dt = this.ExecuteQuery("USP_CP_Admin_BeforeInsert_IsProductModelDuplicate", arlSQLParameters); } catch { throw; } return(dt.Rows.Count > 0 ? true : false); }
private void LoadRecord_OrderDetails() { try { using (BOC_Classifieds_ProductProfile bocProductProfile = new BOC_Classifieds_ProductProfile()) { EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean(); eocPropertyBean.Classifieds_ProductProfile_ProductID = intProductID; eocPropertyBean.Classifieds_UserProfile_ProfileID = intProfileID; Repeater1.DataSource = bocProductProfile.LoadRecord_OrderDetails(eocPropertyBean); Repeater1.DataBind(); } } catch (Exception Exp) { Response.Write(Exp.Message.ToString()); } }
private void GetSellLead_ProductList() { this.strFromDate = ddlStartMonth1.SelectedItem.Value + "/" + ddlStartDay1.SelectedItem.Value + "/" + ddlStartYear1.SelectedItem.Value; this.strToDate = ddlEndMonth1.SelectedItem.Value + "/" + ddlEndDay1.SelectedItem.Value + "/" + ddlEndYear1.SelectedItem.Value; using (BOC_Corporate_ProdProf_Book bocProductProfile = new BOC_Corporate_ProdProf_Book()) { EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean(); eocPropertyBean.Business_UserProfile_ProfileID = intProfileID; eocPropertyBean.FromDate = Convert.ToDateTime(strFromDate); eocPropertyBean.ToDate = Convert.ToDateTime(strToDate); grvSellLead02.DataSource = bocProductProfile.SellLead_Set02_ProductList_Books(eocPropertyBean); grvSellLead02.DataBind(); } Session["SELL_LEAD_FROMDATE"] = strFromDate; Session["SELL_LEAD_TODATE"] = strToDate; }
public int AddRequest(EOC_PropertyBean eocPropertyBean) { int intActionResult = 0; try { ArrayList arlSQLParameters = new ArrayList(); arlSQLParameters.Add(new SqlParameter("@Ad_RequestName", eocPropertyBean.AdRequest_User_Name)); arlSQLParameters.Add(new SqlParameter("@Ad_RequestAddress", eocPropertyBean.AdRequest_User_Address)); arlSQLParameters.Add(new SqlParameter("@Ad_RequestPhoneNo", eocPropertyBean.AdRequest_User_PhoneNo.ToString())); arlSQLParameters.Add(new SqlParameter("@Ad_RequestEmail", eocPropertyBean.AdRequest_User_Mail.ToString())); arlSQLParameters.Add(new SqlParameter("@Ad_RequestMessage", eocPropertyBean.AdRequest_User_Message)); intActionResult = this.ExecuteActionQuery("USP_Common_InsertRequest", arlSQLParameters); } catch { throw; } return(intActionResult); }
protected void btnSubmit_Click(object sender, EventArgs e) { try { using (BOC_Corporate_UserProfile bocUserProfile = new BOC_Corporate_UserProfile()) { EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean(); eocPropertyBean.Business_UserProfile_LoginEmail = txtLoginEmail.Text; DataTable dtLoginInfo = bocUserProfile.SelectRecord_ActivationLinks(eocPropertyBean); if (dtLoginInfo.Rows.Count > 0) { string mailFrom = "*****@*****.**"; string mailTo = txtLoginEmail.Text; string mailSubject = "Your Sign In details"; string mailMessage = string.Empty; mailMessage = "Dear " + dtLoginInfo.Rows[0]["BillingPerson"].ToString() + "," + Environment.NewLine; mailMessage += "Your Sign In details: " + Environment.NewLine; mailMessage += "<strong>Login Email :</strong>" + dtLoginInfo.Rows[0]["LoginEmail"].ToString() + Environment.NewLine; mailMessage += "<strong>Password :</strong>" + dtLoginInfo.Rows[0]["LoginPassword"].ToString() + Environment.NewLine; mailMessage += Environment.NewLine + Environment.NewLine; mailMessage += "Thanks," + Environment.NewLine; mailMessage += "boromela.com Team."; MailMaster.SendMail(mailTo, mailFrom, mailSubject, mailMessage); Response.Redirect("UserProfile_LoginInfo.aspx?mailSend=Yes"); } else { lblSystemMessage.Text = "Your entered email address is not associated with any of our corporate user account!"; } } } catch (Exception exp) { lblSystemMessage.Text = exp.Message.ToString(); } }
/// <summary> /// Loads Classified Posted Product. /// </summary> private void LoadList_Posted_ClassifiedProduct(DateTime _StartDate, DateTime _EndDate) { try { using (BOC_Classifieds_ProductProfile bocProductProfile = new BOC_Classifieds_ProductProfile()) { EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean(); eocPropertyBean.Classifieds_UserProfile_ProfileID = intProfileID; eocPropertyBean.FromDate = _StartDate; eocPropertyBean.ToDate = _EndDate; DataTable dt = bocProductProfile.LoadRecord_ProductProfile(eocPropertyBean); 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 Exp) { //lblCorporateMessage.Text = "Error: " + Exp.Message; } }
/// <summary> /// Select specific user profile from the table Business_UserProfile. /// </summary> /// <param name="eocPropertyBean">EOC_PropertyBean</param> /// <returns>Boolean</returns> public bool SelectRecord_UserProfile(EOC_PropertyBean eocPropertyBean) { bool blnFlag = false; try { ArrayList arlSQLParameters = new ArrayList(); arlSQLParameters.Add(new SqlParameter("@ProfileID", eocPropertyBean.Business_UserProfile_ProfileID.ToString())); DataTable objDataTable = this.ExecuteQuery("USP_CP_UsrPro_SelectSpecificRecord", arlSQLParameters); if (objDataTable.Rows.Count > 0) { blnFlag = true; eocPropertyBean.BusinessCategory_BusinessID = Convert.ToInt32(objDataTable.Rows[0]["BusinessID"].ToString()); eocPropertyBean.Business_UserProfile_LoginEmail = objDataTable.Rows[0]["LoginEmail"].ToString(); eocPropertyBean.Business_UserProfile_LoginPassword = objDataTable.Rows[0]["LoginPassword"].ToString(); eocPropertyBean.Business_UserProfile_CompanyName = objDataTable.Rows[0]["CompanyName"].ToString(); eocPropertyBean.Business_UserProfile_BusinessAddress = objDataTable.Rows[0]["BusinessAddress"].ToString(); eocPropertyBean.Country_CountryID = Convert.ToInt32(objDataTable.Rows[0]["CountryID"].ToString()); eocPropertyBean.State_StateID = Convert.ToInt32(objDataTable.Rows[0]["StateID"].ToString()); eocPropertyBean.Province_ProvinceID = Convert.ToInt32(objDataTable.Rows[0]["ProvinceID"].ToString()); eocPropertyBean.Business_UserProfile_ContactPhone = objDataTable.Rows[0]["ContactPhone"].ToString(); eocPropertyBean.Business_UserProfile_CompanyURL = objDataTable.Rows[0]["CompanyURL"].ToString(); eocPropertyBean.Business_UserProfile_BillingPerson = objDataTable.Rows[0]["BillingPerson"].ToString(); eocPropertyBean.Business_UserProfile_WebInventoryManager = objDataTable.Rows[0]["WebInventoryManager"].ToString(); eocPropertyBean.Business_UserProfile_CompanyProfile = objDataTable.Rows[0]["CompanyProfile"].ToString(); eocPropertyBean.CorporateImagePath = objDataTable.Rows[0]["ImagePath"].ToString(); } else { blnFlag = false; } } catch { throw; } return(blnFlag); }
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(); } }
/// <summary> /// Insert new row in the table Classifieds_UserProfile. /// </summary> /// <param name="eocPropertyBean"></param> /// <returns></returns> public int AddRecord_UserProfile(EOC_PropertyBean eocPropertyBean) { int intActionResult = 0; try { ArrayList arlSQLParameters = new ArrayList(); arlSQLParameters.Add(new SqlParameter("@LoginEmail", eocPropertyBean.Classifieds_UserProfile_LoginEmail)); if (this.ExecuteQuery("USP_Common_UsrPro_BeforeInsert_IsLoginEmailDuplicate", arlSQLParameters).Rows.Count == 0) { arlSQLParameters.Clear(); arlSQLParameters.Add(new SqlParameter("@LoginEmail", eocPropertyBean.Classifieds_UserProfile_LoginEmail)); arlSQLParameters.Add(new SqlParameter("@LoginPassword", eocPropertyBean.Classifieds_UserProfile_LoginPassword)); arlSQLParameters.Add(new SqlParameter("@AdvertiserName", eocPropertyBean.Classifieds_UserProfile_AdvertiserName)); arlSQLParameters.Add(new SqlParameter("@ContactAddress", eocPropertyBean.Classifieds_UserProfile_ContactAddress)); //arlSQLParameters.Add(new SqlParameter("@CountryID", eocPropertyBean.Country_CountryID.ToString())); arlSQLParameters.Add(new SqlParameter("@ProvinceID", eocPropertyBean.Province_ProvinceID.ToString())); arlSQLParameters.Add(new SqlParameter("@Mobile", eocPropertyBean.Classifieds_UserProfile_Mobile)); arlSQLParameters.Add(new SqlParameter("@UpdatedOn", eocPropertyBean.UpdatedOn.ToString())); arlSQLParameters.Add(new SqlParameter("@Source", eocPropertyBean.Source.ToString())); arlSQLParameters.Add(new SqlParameter("@ReferalName", eocPropertyBean.ReferalName.ToString())); arlSQLParameters.Add(new SqlParameter("@ImagePath", eocPropertyBean.ImagePath.ToString())); intActionResult = this.ExecuteActionQuery("USP_CL_UsrPro_InsertRecord", arlSQLParameters); } else { intActionResult = -1; } } catch { throw; } return(intActionResult); }
public int AddRecord_ProductReview(EOC_PropertyBean eocPropertyBean) { int intActionResult = 0; try { ArrayList arlSQLParameters = new ArrayList(); arlSQLParameters.Add(new SqlParameter("@ProductID", eocPropertyBean.Classifieds_ProductProfile_ProductID.ToString())); arlSQLParameters.Add(new SqlParameter("@CriticsName", eocPropertyBean.ProductReview_Classified_CriticsName)); arlSQLParameters.Add(new SqlParameter("@Review", eocPropertyBean.ProductReview_Classified_Review)); intActionResult = this.ExecuteActionQuery("USP_CL_ProdReview_InsertRecord", arlSQLParameters); } catch { throw; } return(intActionResult); }
private void GetSellLead_OrderDetail() { if (this.Session["SELL_LEAD_FROMDATE"] != null || this.Session["SELL_LEAD_TODATE"] != null || string.IsNullOrEmpty(Request.QueryString["Email"]) == false) { strFromDate = this.Session["SELL_LEAD_FROMDATE"].ToString(); strToDate = this.Session["SELL_LEAD_TODATE"].ToString(); strCustomerEmail = Request.QueryString["Email"]; using (BOC_Corporate_ProdProf_Book bocProductProfile = new BOC_Corporate_ProdProf_Book()) { EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean(); eocPropertyBean.Business_UserProfile_ProfileID = intProfileID; eocPropertyBean.Business_OrderDetail_Books_CustomerEmail = strCustomerEmail; eocPropertyBean.FromDate = Convert.ToDateTime(strFromDate); eocPropertyBean.ToDate = Convert.ToDateTime(strToDate); grvSellLead02.DataSource = bocProductProfile.SellLead_OrderDetail(eocPropertyBean); grvSellLead02.DataBind(); } } }
private int AddRecord_UserProfile() { int intActionResult = 0; try { using (BOC_Classifieds_UserProfile bocUserProfile = new BOC_Classifieds_UserProfile()) { EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean(); eocPropertyBean.Classifieds_UserProfile_LoginEmail = txtEmail1.Text; eocPropertyBean.Classifieds_UserProfile_LoginPassword = txtPassword1.Text; eocPropertyBean.Classifieds_UserProfile_AdvertiserName = txtName.Text; eocPropertyBean.Classifieds_UserProfile_ContactAddress = txtAddress.Text; eocPropertyBean.Province_ProvinceID = Convert.ToInt32(ddlProvince.SelectedItem.Value); eocPropertyBean.Classifieds_UserProfile_Mobile = txtCellPhoe.Text; eocPropertyBean.UpdatedOn = DateTime.Now; eocPropertyBean.ImagePath = ImagePath.ToString(); eocPropertyBean.Source = ddlSource.SelectedValue; if (ddlSource.SelectedValue == "News Paper" || ddlSource.SelectedValue == "Search Engine" || ddlSource.SelectedValue == "Friend") { eocPropertyBean.ReferalName = Server.HtmlEncode(txtReferalName.Text); } else { eocPropertyBean.ReferalName = ""; } intActionResult = bocUserProfile.AddRecord_UserProfile(eocPropertyBean); } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } return(intActionResult); }
/// <summary> /// Select specific user profile from the table Classifieds_UserProfile. /// </summary> /// <param name="eocPropertyBean"></param> /// <returns></returns> public bool SelectRecord_UserProfile(EOC_PropertyBean eocPropertyBean) { bool blnFlag = false; try { ArrayList arlSQLParameters = new ArrayList(); arlSQLParameters.Add(new SqlParameter("@ProfileID", eocPropertyBean.Classifieds_UserProfile_ProfileID.ToString())); DataTable objDataTable = this.ExecuteQuery("USP_CL_UsrPro_SelectSpecificRecord", arlSQLParameters); if (objDataTable.Rows.Count > 0) { blnFlag = true; eocPropertyBean.Classifieds_UserProfile_LoginEmail = objDataTable.Rows[0]["LoginEmail"].ToString(); eocPropertyBean.Classifieds_UserProfile_LoginPassword = objDataTable.Rows[0]["LoginPassword"].ToString(); eocPropertyBean.Classifieds_UserProfile_AdvertiserName = objDataTable.Rows[0]["AdvertiserName"].ToString(); eocPropertyBean.Classifieds_UserProfile_ContactAddress = objDataTable.Rows[0]["ContactAddress"].ToString(); eocPropertyBean.Country_CountryID = Convert.ToInt32(objDataTable.Rows[0]["CountryID"].ToString()); eocPropertyBean.State_StateID = Convert.ToInt32(objDataTable.Rows[0]["StateID"].ToString()); eocPropertyBean.Province_ProvinceID = Convert.ToInt32(objDataTable.Rows[0]["ProvinceID"].ToString()); eocPropertyBean.Classifieds_UserProfile_Mobile = objDataTable.Rows[0]["ContactPhone"].ToString(); eocPropertyBean.Classifieds_UserProfile_IsActive = Convert.ToBoolean(objDataTable.Rows[0]["IsActive"].ToString()); eocPropertyBean.Classified_ImagePath = objDataTable.Rows[0]["ImagePath"].ToString(); } else { blnFlag = false; } } catch { throw; } return(blnFlag); }
/// <summary> /// Description : Check Business User login authentication. /// Stored Procedure : USP_CP_UsrPro_GetLoginInfo /// Associate Control: Executes in Page_Load event. /// </summary> private void IsLoginValid() { 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["CORP_PROFILE_CODE"] = eocPropertyBean.Business_UserProfile_ProfileID.ToString(); this.Session["CORP_COUNTRY_CODE"] = eocPropertyBean.Country_CountryID.ToString(); Response.Redirect("ControlPanel.aspx"); } } } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } }
//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(); } }
/// <summary> /// Check Business User login authentication. /// </summary> /// <param name="eocPropertyBean">EOC_PropertyBean</param> /// <returns>Boolean</returns> public bool IsLoginValid(EOC_PropertyBean eocPropertyBean) { bool blnFlag = false; try { ArrayList arlSQLParameters = new ArrayList(); arlSQLParameters.Add(new SqlParameter("@LoginEmail", eocPropertyBean.Business_UserProfile_LoginEmail)); arlSQLParameters.Add(new SqlParameter("@LoginPassword", eocPropertyBean.Business_UserProfile_LoginPassword)); DataTable objDataTable = this.ExecuteQuery("USP_CP_UsrPro_GetLoginInfo", arlSQLParameters); if (objDataTable.Rows.Count > 0) { eocPropertyBean.Business_UserProfile_ProfileID = Convert.ToInt32(objDataTable.Rows[0]["ProfileID"].ToString()); //eocPropertyBean.Country_CountryID = Convert.ToInt32(objDataTable.Rows[0]["Country"].ToString()); eocPropertyBean.Business_UserProfile_IsActive = Convert.ToBoolean(objDataTable.Rows[0]["IsActive"].ToString()); //eocPropertyBean.Country_CountryName = objDataTable.Rows[0]["Country"].ToString(); eocPropertyBean.Business_UserProfile_CompanyName = objDataTable.Rows[0]["CompanyName"].ToString(); eocPropertyBean.Business_UserProfile_LoginEmail = objDataTable.Rows[0]["LoginEmail"].ToString(); eocPropertyBean.IsAdmin = Convert.ToBoolean(objDataTable.Rows[0]["IsAdmin"]); blnFlag = true; } else { blnFlag = false; } } catch { throw; } return(blnFlag); }
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(); } }
public int AddRecord_ProductOrder(EOC_PropertyBean eocPropertyBean) { int intActionResult = 0; string a = ""; try { ArrayList arlSQLParameters = new ArrayList(); arlSQLParameters.Add(new SqlParameter("@ProductID", eocPropertyBean.Classifieds_ProductProfile_ProductID.ToString())); arlSQLParameters.Add(new SqlParameter("@CustomerEmail", eocPropertyBean.Classifieds_OrderDetail_CustomerEmail)); arlSQLParameters.Add(new SqlParameter("@CustomerName", eocPropertyBean.Classifieds_OrderDetail_CustomerName)); arlSQLParameters.Add(new SqlParameter("@CustomerMessage", eocPropertyBean.Classifieds_OrderDetail_CustomerMessage)); //arlSQLParameters.Add(new SqlParameter("@UpdatedOn", eocPropertyBean.UpdatedOn.ToString())); intActionResult = this.ExecuteActionQuery("USP_CL_OrderDetails_Classifieds_InsertRecord", arlSQLParameters); } catch { throw; } return(intActionResult); }
private int IsLoginValid(string _LoginEmail, string _LoginPassword) { int _ActionResult = 0; string _Message = ""; Authentication auth = new Authentication(); EOC_PropertyBean bean = new EOC_PropertyBean(); bean.LoginEmail = _LoginEmail; bean.Password = _LoginPassword; EOC_PropertyBean userCredentials = auth.GetUserLoginCredential(bean); _Message = userCredentials.Message; //lblSystemMessage.Text = _Message; if (_Message == "Success") { } else { DisplayMessage(auth.IsUserValid(bean)); } return(_ActionResult); }
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); }
/// <summary> /// Inserts a new row for Book both in Product_Master and Product_Seller_Detail table. /// </summary> /// <returns></returns> private int Add_MasterRecord_BookProduct() { int intActionResult = 0; try { using (BOC_Corporate_ProdProf_Book bocProductProfile = new BOC_Corporate_ProdProf_Book()) { EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean(); eocPropertyBean.Business_UserProfile_ProfileID = Convert.ToInt32(txtProfileID.Text); eocPropertyBean.Category_CategoryID = Convert.ToInt32(txtCategoryID.Text); eocPropertyBean.Subcategory_SubcategoryID = Convert.ToInt32(txtSubcategoryID.Text); eocPropertyBean.SecondSubcategory_SubcategoryID = Convert.ToInt32(txtSecondSubcatID.Text); eocPropertyBean.Business_ProductProfile_Books_BookTitle = lblProductTitle.Text; eocPropertyBean.Business_ProductProfile_Books_SKU = lblSku.Text; eocPropertyBean.Business_ProductProfile_Books_BookDescription = txtDescription.Text; eocPropertyBean.Business_ProductProfile_Books_Quantity = Convert.ToInt32(lblQuantity.Text); eocPropertyBean.Business_ProductProfile_Books_Currency = lblCurrency.Text; eocPropertyBean.Business_ProductProfile_Books_ProductPrice = Convert.ToDouble(lblProductPrice.Text); if (lblSalePrice.Text != "") { eocPropertyBean.Business_ProductProfile_Books_SalePrice = Convert.ToDouble(lblSalePrice.Text); eocPropertyBean.Business_ProductProfile_Books_StartDate = Convert.ToDateTime(lblSaleFromDate.Text); eocPropertyBean.Business_ProductProfile_Books_EndDate = Convert.ToDateTime(lblSaleToDate.Text); } else { eocPropertyBean.Business_ProductProfile_Books_SalePrice = 0.00; eocPropertyBean.Business_ProductProfile_Books_StartDate = DateTime.Now; eocPropertyBean.Business_ProductProfile_Books_EndDate = DateTime.Now; } eocPropertyBean.Business_Product_Profile_Books_Condition = lblCondition.Text; eocPropertyBean.Business_Product_Profile_Books_ConditionNote = txtConditionNote.Text; eocPropertyBean.Business_ProductProfile_Books_PaymentOption = ddlPaymentOption.SelectedValue; eocPropertyBean.Business_ProductProfile_Books_DeliveryArea = ddlDeliveryArea.SelectedItem.Text; if (ddlPaymentOption.SelectedValue == "COD") { eocPropertyBean.Business_ProductProfile_Books_CashOnDeliveryCost = Convert.ToDouble(txtCODCost.Text); } else { eocPropertyBean.Business_ProductProfile_Books_CashOnDeliveryCost = 0.00; } eocPropertyBean.Business_ProductProfile_Books_PaperBackForBook = txtPaperBack.Text; eocPropertyBean.Business_Product_Profile_Books_Language = txtLanguage.Text; eocPropertyBean.Business_Product_Profile_Books_DimensionForBook = txtDimensionForBook.Text; eocPropertyBean.Business_Product_Profile_Books_ShippingWeight = txtShippingWeight.Text; eocPropertyBean.Business_ProductProfile_Books_Edition = txtEdition.Text; eocPropertyBean.Business_ProductProfile_Books_ISBN = txtISBN.Text; eocPropertyBean.Business_ProductProfile_Books_Author = txtAuthor.Text; eocPropertyBean.Business_ProductProfile_Books_Publisher = txtPublisher.Text; if (string.IsNullOrEmpty(txtImagePath.Text)) { eocPropertyBean.Business_ProductProfile_Books_ProductImage = @"../Corporate_ProductImage/default.png"; } else { eocPropertyBean.Business_ProductProfile_Books_ProductImage = txtImagePath.Text; } eocPropertyBean.UserType = businessSeller; eocPropertyBean.UpdatedOn = DateTime.Now; eocPropertyBean.Business_ProductProfile_IsActive = chkIsActive.Checked; intActionResult = bocProductProfile.Insert_MasterRecord_BookProduct(eocPropertyBean); } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } return(intActionResult); }
/// <summary> /// Updates Book Record of the tag seller. /// </summary> /// <returns></returns> private int Update_TagSeller_BookRecord() { int intActionResult = 0; try { using (BOC_Corporate_ProdProf_Book bocProductProfile = new BOC_Corporate_ProdProf_Book()) { EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean(); eocPropertyBean.Business_UserProfile_ProfileID = Convert.ToInt32(txtProfileID.Text); eocPropertyBean.Business_ProductProfile_Books_ProductID = Convert.ToInt32(txtProductID.Text); eocPropertyBean.Business_ProductProfile_Books_BookDescription = txtDescription.Text; eocPropertyBean.Business_ProductProfile_Books_Quantity = Convert.ToInt32(lblQuantity.Text); eocPropertyBean.Business_ProductProfile_Books_Currency = lblCurrency.Text; eocPropertyBean.Business_ProductProfile_Books_ProductPrice = Convert.ToDouble(lblProductPrice.Text); if (lblSalePrice.Text != "") { eocPropertyBean.Business_ProductProfile_Books_SalePrice = Convert.ToDouble(lblSalePrice.Text); eocPropertyBean.Business_ProductProfile_Books_StartDate = Convert.ToDateTime(lblSaleFromDate.Text); eocPropertyBean.Business_ProductProfile_Books_EndDate = Convert.ToDateTime(lblSaleToDate.Text); } else { eocPropertyBean.Business_ProductProfile_Books_SalePrice = 0.00; eocPropertyBean.Business_ProductProfile_Books_StartDate = DateTime.Now; eocPropertyBean.Business_ProductProfile_Books_EndDate = DateTime.Now; } eocPropertyBean.Business_Product_Profile_Books_Condition = lblCondition.Text; eocPropertyBean.Business_Product_Profile_Books_ConditionNote = txtConditionNote.Text; eocPropertyBean.Business_ProductProfile_Books_PaymentOption = ddlPaymentOption.SelectedValue; eocPropertyBean.Business_ProductProfile_Books_DeliveryArea = ddlDeliveryArea.SelectedItem.Text; if (ddlPaymentOption.SelectedValue == "COD") { eocPropertyBean.Business_ProductProfile_Books_CashOnDeliveryCost = Convert.ToDouble(txtCODCost.Text); } else { eocPropertyBean.Business_ProductProfile_Books_CashOnDeliveryCost = 0.00; } eocPropertyBean.Business_ProductProfile_Books_PaperBackForBook = txtPaperBack.Text; eocPropertyBean.Business_Product_Profile_Books_Language = txtLanguage.Text; eocPropertyBean.Business_Product_Profile_Books_DimensionForBook = txtDimensionForBook.Text; eocPropertyBean.Business_Product_Profile_Books_ShippingWeight = txtShippingWeight.Text; eocPropertyBean.UserType = businessSeller; eocPropertyBean.UpdatedOn = DateTime.Now; eocPropertyBean.Business_ProductProfile_IsActive = chkIsActive.Checked; intActionResult = bocProductProfile.Update_TagSeller_BookRecord(eocPropertyBean); } } catch (Exception Exp) { lblSystemMessage.Text = Exp.Message.ToString(); } return(intActionResult); }
/// <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(); } }