Exemple #1
0
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     try
     {
         cls_Property clsp = new cls_Property();
         clsp.Insert_SearchedProperty(txtName.Text, PropertyType.SelectedValue, txtEmail.Text, txtPhoneNumber.Text, Convert.ToInt32(Radius.SelectedValue));
         string UserEmailId = ConfigurationManager.AppSettings["RegFromMailAddress"].ToString();
         string ToEmailId   = ConfigurationManager.AppSettings["ToEmailID"].ToString();
         SendMailToAdmin(UserEmailId);
         SendMailToUser(UserEmailId);
         clear();
         ScriptManager.RegisterStartupScript(this, this.GetType(), "Success", "alert('Thanks for Submitting! Someone from our team will contact you shortly');", true);
     }
     catch (Exception ex)
     {
     }
     finally
     { }
 }
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     try
     {
         cls_Property clsp = new cls_Property();
         clsp.Insert_Home_worth(Name.Text, txtlastname.Text, PhoneNumber.Text, Email.Text, ddl.SelectedItem.Text);
         string UserEmailId = ConfigurationManager.AppSettings["RegFromMailAddress"].ToString();
         string ToEmailId   = ConfigurationManager.AppSettings["ToEmailID"].ToString();
         var    address     = Request.QueryString["address"].ToString();
         SendMailToAdmin(UserEmailId, address);
         SendMailToUser(UserEmailId);
         ScriptManager.RegisterStartupScript(this, this.GetType(), "Success", "alert('Thanks for Submitting! Someone from our team will contact you shortly');", true);
         clear();
     }
     catch (Exception ex)
     {
     }
     finally
     { }
 }
Exemple #3
0
        protected void btnSend_Click(object sender, EventArgs e)
        {
            try
            {
                cls_Property clsp     = new cls_Property();
                var          details  = ddlPtypeDetails.SelectedItem;
                string       detailss = "";
                if (details != null)
                {
                    detailss = ddlPtypeDetails.SelectedItem.Text.ToString();
                }
                string prop = "";
                if (ddlProperty.SelectedItem.Text != "Any")
                {
                    prop = ddlProperty.SelectedItem.Text;
                }
                clsp.Insert_AddLease(txtName.Text, txtEmail.Text, txtPhoneno.Text, Convert.ToString(ddlPriceRange.SelectedValue), Convert.ToString(ddlCity.SelectedValue), prop, detailss);

                //int indextilldel = Request.Url.AbsoluteUri.IndexOf("Posting");

                string UserEmailId = txtEmail.Text;
                string ToEmailId   = ConfigurationManager.AppSettings["ToEmailID"].ToString();
                SendMailToAdmin(UserEmailId);
                SendMailToUser(UserEmailId);

                txtName.Text = "";

                txtPhoneno.Text = "";
                txtEmail.Text   = "";

                ScriptManager.RegisterStartupScript(this, this.GetType(), "Congrts!", "alert('Your E-mail has been sent sucessfully - Thank You');", true);
                return;
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Failure", "alert('Your message failed to send, please try again.');", true);
                return;
                //If the message failed at some point, let the user know
                //lblResult.Text = "Your message failed to send, please try again.";
            }
        }
Exemple #4
0
        protected void btnSend_Click(object sender, EventArgs e)
        {
            try
            {
                cls_Property clsp = new cls_Property();

                SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConStr"].ConnectionString.ToString());
                conn.Open();

                string     sql = "INSERT INTO AdminClient(Name,EmailId,PhoneNo,Status) VALUES(@param1,@param2,@param3,@param4)";
                SqlCommand cmd = new SqlCommand(sql, conn);
                cmd.Parameters.Add("@param1", SqlDbType.VarChar).Value     = txtName.Text;
                cmd.Parameters.Add("@param2", SqlDbType.VarChar, 50).Value = txtEmail.Text;
                cmd.Parameters.Add("@param3", SqlDbType.VarChar, 50).Value = txtPhoneno.Text;
                cmd.Parameters.Add("@param4", SqlDbType.VarChar, 50).Value = "Active";
                cmd.CommandType = CommandType.Text;
                cmd.ExecuteNonQuery();
                conn.Close();


                string UserEmailId = txtEmail.Text;
                string ToEmailId   = ConfigurationManager.AppSettings["ToEmailID"].ToString();
                SendMailToAdmin(UserEmailId);
                // SendMailToUser(UserEmailId);

                txtName.Text = "";

                txtPhoneno.Text = "";
                txtEmail.Text   = "";

                ScriptManager.RegisterStartupScript(this, this.GetType(), "Thanks!", "alert('Your E-mail has been sent sucessfullyy');", true);
                return;
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Failure", "alert('Your message failed to send, please try again.');", true);
                return;
                //If the message failed at some point, let the user know
                //lblResult.Text = "Your message failed to send, please try again.";
            }
        }
Exemple #5
0
        protected void btnCreateFeature_Click(object sender, EventArgs e)
        {
            if (txtFeature.Text == "")
            {
                lblError.Text = "MLS-ID required";
                return;
            }
            cls_Property objprp = new cls_Property();

            objprp.MLSID = txtFeature.Text;
            int result = objprp.Insert_FeatureProperty();

            if (result > 0)
            {
                lblError.Text = "Feature property successfully created!";
            }
            else
            {
                lblError.Text = "An error has occurred!!";
            }
        }
Exemple #6
0
 protected void btnSend_Click(object sender, EventArgs e)
 {
     try
     {
         cls_Property clsp = new cls_Property();
         clsp.Insert_AddPowerOfSale(txtName.Text, txtEmail.Text, txtPhoneno.Text, Convert.ToString(ddlPriceRange.SelectedValue), Convert.ToString(ddlCity.SelectedValue));
         string UserEmailId = txtEmail.Text;
         string ToEmailId   = ConfigurationManager.AppSettings["ToEmailID"].ToString();
         SendMailToAdmin(UserEmailId);
         SendMailToUser(UserEmailId);
         txtName.Text    = "";
         txtPhoneno.Text = "";
         txtEmail.Text   = "";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "Congrts!", "alert('Your E-mail has been sent sucessfully - Thank You');", true);
         return;
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "Failure", "alert('Your message failed to send, please try again.');", true);
         return;
     }
 }
Exemple #7
0
        protected void btnCreateFeature_Click(object sender, EventArgs e)
        {
            if (txtFeature.Text == "")
            {
                lblError.Text = "MLS-ID required";
                return;
            }
            cls_Property objprp = new cls_Property();
            string       mls    = txtFeature.Text;
            DataTable    dt     = objprp.GetFeaturedPropertiesByMlsId(mls);

            if (dt.Rows.Count > 0)
            {
                grdFeatures.DataSource = dt;
                grdFeatures.DataBind();
                lblError.Visible = false;
            }
            else
            {
                lblError.Text = "No Property Found!!";
            }
        }
Exemple #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Session["Municipality"] = Request.QueryString["Municipality"];
            //Session["QueryString"] = Request.QueryString["PropertyType"];
            //if (Session["SearchType"] == "Residential" || Convert.ToString(Session["QueryString"]) == "Residential")
            //    SearchResidentialProperties();
            //else if (Session["SearchType"] == "Commercial" || Convert.ToString(Session["QueryString"]) == "Commercial")
            //    SearchCommercialProperties();
            //else if (Session["SearchType"] == "Condo" || Convert.ToString(Session["QueryString"]) == "Condo")
            //    SearchCondoProperties();
            //else
            //{

            //}
            cls_Property clsobj = new cls_Property();
            DataTable    dt     = clsobj.GetSiteSettings();

            if (dt.Rows.Count > 0)
            {
                siteTitle.Text = Convert.ToString(dt.Rows[0]["Title"]);
                // lblemail.Text = Convert.ToString(dt.Rows[0]["Email"]);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                InsertFeatureProperties();
                GetFeatureProperties();
            }
            if (Session["ListView"] == null)
            {
                Session["ListView"] = "ShowGrid";
            }
            if (Session["ListView"] == "ShowGrid")
            {
                DivListSearch.Style.Add("display", "Block");
                DivGridSearch.Style.Add("display", "none");
            }
            cls_Property clsobj = new cls_Property();
            DataTable    dt     = clsobj.GetSiteSettings();

            if (dt.Rows.Count > 0)
            {
                // lblemail.Text = Convert.ToString(dt.Rows[0]["Email"]);
            }
        }
Exemple #10
0
        protected void btnCreateTestimonial_Click(object sender, EventArgs e)
        {
            var photopath = "";

            if (txtcomment.Text == "")
            {
                lblError.Text = "Testimonial Tour required";
                return;
            }
            if (ClientPhoto.PostedFile != null && ClientPhoto.PostedFile.FileName != "")
            {
                photopath = SaveImageFile();
            }
            cls_Property objprp = new cls_Property();

            objprp.FirstName = txtName.Text;
            objprp.LastName  = txtlname.Text;
            objprp.date      = txtDate.Text;
            objprp.comments  = txtcomment.Text;
            objprp.ImageUrl  = photopath;
            int result = objprp.Insert_Testimonial();

            if (result > 0)
            {
                //lblError.Text = "Virtual Tour successfully created!";
                txtName.Text    = string.Empty;
                txtlname.Text   = string.Empty;
                txtDate.Text    = string.Empty;
                txtcomment.Text = string.Empty;
            }
            else
            {
                lblError.Text = "An error has occurred!!";
            }
            Response.Redirect("~/admin/Testimonials.aspx");
        }
        void GetVideoList()
        {
            try
            {
                cls_Property cls = new cls_Property();
                DataTable    dt  = new DataTable();

                dt = cls.GetVideoList();



                if (dt.Rows.Count > 0)
                {
                    PagedDataSource pagedData = new PagedDataSource();
                    pagedData.DataSource       = dt.DefaultView;
                    pagedData.AllowPaging      = true;
                    pagedData.PageSize         = 8;
                    pagedData.CurrentPageIndex = 1;
                    ViewState["totpage"]       = pagedData.PageCount;

                    rptSearchResults.DataSource = dt;
                    rptSearchResults.DataBind();
                }
                else
                {
                    //btnGridView.Visible = false;
                    //btnListView.Visible = false;
                }
            }
            catch (Exception ex)
            {
            }
            finally
            {
            }
        }
        protected void btnSend_Click(object sender, EventArgs e)
        {
            try
            {
                cls_Property clsp = new cls_Property();
                clsp.Insert_ContactUS(txtFirstName.Text, txtLastName.Text, txtEmail.Text, txtPhoneno.Text, txtMessage.Text);
                //int indextilldel = Request.Url.AbsoluteUri.IndexOf("Posting");

                string        UserEmailId = ConfigurationManager.AppSettings["RegFromMailAddress"].ToString();
                string        ToEmailId   = ConfigurationManager.AppSettings["ToEmailID"].ToString();
                SqlConnection conn        = new SqlConnection(ConfigurationManager.ConnectionStrings["ConStr"].ToString());
                conn.Open();
                SqlCommand command = new SqlCommand("Select title from [tbl_PreConstruction] where Id=@Id", conn);
                //
                // Add new SqlParameter to the command.
                //
                var Id = Request.QueryString["ID"].ToString();
                command.Parameters.AddWithValue("@Id", Convert.ToInt32(Id));
                string result = command.ExecuteScalar().ToString();
                SendMailToAdmin(UserEmailId, result);
                SendMailToUser(UserEmailId);

                txtFirstName.Text = "";
                txtLastName.Text  = "";
                txtPhoneno.Text   = "";
                txtEmail.Text     = "";
                txtMessage.Text   = "";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Congrts!", "alert('Your E-mail has been sent sucessfully - Thank You');", true);
                return;
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Failure", "alert('Your message failed to send, please try again.');", true);
                return;
            }
        }