Beispiel #1
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        try
        {
            SqlParameter[] parameter =
            {
                new SqlParameter("@Name",    txtName.Text),
                new SqlParameter("@Email",   txtEmail.Text),
                new SqlParameter("@Contact", txtContact.Text)
            };

            int i = db.ExecuteNonQueryByProc("contact_info", parameter);
            if (i > 0)
            {
                Label2.Visible   = true;
                Label2.ForeColor = System.Drawing.Color.Red;
                Label2.Text      = "Your contact details Send Successfull.. Thank you!!";
            }
            else
            {
                Label2.ForeColor = System.Drawing.Color.Red;
                Label2.Text      = "There is some Problem in registration, Please try again..!!";
            }
        }
        catch (SqlException ex)
        {
            Label2.ForeColor = System.Drawing.Color.Red;
            Label2.Text      = ex.Message;
        }
        catch (Exception ex)
        {
            Label2.ForeColor = System.Drawing.Color.Red;
            Label2.Text      = ex.Message;
        }
    }
Beispiel #2
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (RadioButton1.Checked)
        {
            gender = RadioButton1.Text;
        }
        else if (RadioButton2.Checked)
        {
            gender = RadioButton2.Text;
        }

        try
        {
            SqlParameter[] parameter =
            {
                new SqlParameter("@Name",      txtName.Text),
                new SqlParameter("@User_Name", txtUserName.Text),
                new SqlParameter("@Gender",    gender),
                new SqlParameter("@Phone",     txtPhone.Text),
                new SqlParameter("@Address",   txtAddress.Text),
                new SqlParameter("@Password",  txtPassword.Text),
                new SqlParameter("@Email",     txtEmail.Text),
                new SqlParameter("@Age",       txtAge.Text),
                new SqlParameter("@Aadhar_no", txtAadhar.Text)
            };

            int i = db.ExecuteNonQueryByProc("insert_User'sProfile", parameter);
            if (i > 0)
            {
                linkbtn.ForeColor = System.Drawing.Color.Red;
                linkbtn.Text      = "Registration Successfull..!!";
                Button1.Visible   = true;
            }
            else
            {
                linkbtn.ForeColor = System.Drawing.Color.Red;
                linkbtn.Text      = "There is some Problem in registration, Please try again..!!";
            }
        }
        catch (SqlException ex)
        {
            linkbtn.ForeColor = System.Drawing.Color.Red;
            linkbtn.Text      = ex.Message;
        }
        catch (Exception ex)
        {
            linkbtn.ForeColor = System.Drawing.Color.Red;
            linkbtn.Text      = ex.Message;
        }
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        string filepath = "~/Seller/Uploads/" + FileUpload1.FileName;

        try
        {
            FileInfo fileinfo = new FileInfo(FileUpload1.FileName);
            if (fileinfo.Extension == ".JPEG" || fileinfo.Extension == ".jpeg" || fileinfo.Extension == ".JPG" || fileinfo.Extension == ".jpg" || fileinfo.Extension == ".jpeg" || fileinfo.Extension == ".GIF" || fileinfo.Extension == ".gif")
            {
                FileUpload1.PostedFile.SaveAs(Server.MapPath(filepath));
            }
        }
        catch (Exception) { }
        try
        {
            SqlParameter[] parameter =
            {
                new SqlParameter("@Name",      txtName.Text),
                new SqlParameter("@User_Name", txtusername.Text),
                new SqlParameter("@Email",     txtEmail.Text),
                new SqlParameter("@Phone",     txtPhone.Text),
                new SqlParameter("@Age",       txtAge.Text),
                new SqlParameter("@Password",  txtPassword.Text),
                new SqlParameter("@Image",     filepath)
            };

            int i = db.ExecuteNonQueryByProc("Insert_SellerInfo", parameter);
            if (i > 0)
            {
                lblerrorMessage.Text = "You are Become a Seller Successfull..!!";
                //lnkbtnUploadProperty.Visible = true;
                //lnkbtnViewProfile.Visible = true;
            }
            else
            {
                lblerrorMessage.Text = "There is some Problem in registration, Please try again..!!";
            }
        }
        catch (SqlException ex)
        {
            lblerrorMessage.ForeColor = System.Drawing.Color.Red;
            lblerrorMessage.Text      = ex.Message;
        }
        catch (Exception ex)
        {
            lblerrorMessage.ForeColor = System.Drawing.Color.Red;
            lblerrorMessage.Text      = ex.Message;
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (RadioButtonBank.Checked)
        {
            choice = RadioButtonBank.Text;
        }
        else if (RadioButtonCredit.Checked)
        {
            choice = RadioButtonCredit.Text;
        }
        else if (RadioButtonDebit.Checked)
        {
            choice = RadioButtonDebit.Text;
        }
        else if (RadioButtonGoogleWallet.Checked)
        {
            choice = RadioButtonGoogleWallet.Text;
        }
        else if (RadioButtonPaytm.Checked)
        {
            choice = RadioButtonPaytm.Text;
        }
        else if (RadioButtonVisa.Checked)
        {
            choice = RadioButtonVisa.Text;
        }
        try
        {
            SqlParameter[] parameter =
            {
                new SqlParameter("@pro_Id",       Convert.ToInt32(lblProperty.Text)),
                new SqlParameter("@UserId",       Session["User"].ToString()),
                new SqlParameter("@Rent_amount",  lblRentAmount.Text),
                new SqlParameter("@Expiry_date",  txtExpiry.Text),
                new SqlParameter("@Created_date", txtCreated.Text),
                new SqlParameter("@Debit",        choice),
                new SqlParameter("@Credit",       choice),
                new SqlParameter("@cvv",          txtCVV.Text),
                new SqlParameter("@Visa_Master",  choice),
                new SqlParameter("@GoogleWallet", choice),
                new SqlParameter("@Paytm",        choice),
                new SqlParameter("@Bank_payment", choice),
                new SqlParameter("@CardNumber",   txtCardNumber.Text),
                new SqlParameter("@AccNumber",    txtAccountNo.Text),
                new SqlParameter("@Mobile",       txtNumberDetails.Text)
            };

            int i = db.ExecuteNonQueryByProc("Insert_RentPayment", parameter);
            if (i > 0)
            {
                lblMessage.ForeColor = System.Drawing.Color.Red;
                lblMessage.Text      = "Congratulations you are become a Tenant..!!";
            }
            else
            {
                lblMessage.ForeColor = System.Drawing.Color.Red;
                lblMessage.Text      = "There is some Problem in registration, Please try again..!!";
            }
        }
        catch (SqlException ex)
        {
            lblMessage.ForeColor = System.Drawing.Color.Red;
            lblMessage.Text      = ex.Message;
        }
        catch (Exception ex)
        {
            lblMessage.ForeColor = System.Drawing.Color.Red;
            lblMessage.Text      = ex.Message;
        }
    }
Beispiel #5
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (Request.QueryString["pid"] != null)
        {
            string    quer = "select * from BookingPayment where Prop_id='" + Request.QueryString["pid"].ToString() + "'";
            DataTable dt   = new DataTable();
            dt = db.GetDataTableByQuery(quer);
            if (dt.Rows.Count > 0)
            {
                Response.Write("<script>alert('This Property is already booked try another Property for Booking')</script>");
                return;
            }
        }

        if (RadioButtonBankPayment.Checked)
        {
            choice = RadioButtonBankPayment.Text;
        }
        else if (RadioButtonCredit.Checked)
        {
            choice = RadioButtonCredit.Text;
        }
        else if (RadioButtonDebit.Checked)
        {
            choice = RadioButtonDebit.Text;
        }
        else if (RadioButtonGoogleWallet.Checked)
        {
            choice = RadioButtonGoogleWallet.Text;
        }
        else if (RadioButtonPaytm.Checked)
        {
            choice = RadioButtonPaytm.Text;
        }
        else if (RadioButtonvisa.Checked)
        {
            choice = RadioButtonvisa.Text;
        }
        try
        {
            SqlParameter[] parameter =
            {
                new SqlParameter("@pro_Id",       Convert.ToInt32(lblPropertyId.Text)),
                new SqlParameter("@UserId",       Session["User"].ToString()),
                new SqlParameter("@Book_amount",  lblBooking.Text),
                new SqlParameter("@Expiry_date",  txtExpiry.Text),
                new SqlParameter("@Created_date", txtCreated.Text),
                new SqlParameter("@Debit",        choice),
                new SqlParameter("@Credit",       choice),
                new SqlParameter("@cvv",          txtCVV.Text),
                new SqlParameter("@Visa_Master",  choice),
                new SqlParameter("@GoogleWallet", choice),
                new SqlParameter("@Paytm",        choice),
                new SqlParameter("@Bank_payment", choice),
                new SqlParameter("@CardNumber",   txtCard.Text),
                new SqlParameter("@AccNumber",    txtAccount.Text),
                new SqlParameter("@Mobile",       txtmobile.Text),
            };

            int i = db.ExecuteNonQueryByProc("Booking_Payment", parameter);
            if (i > 0)
            {
                lblMessage.ForeColor = System.Drawing.Color.Red;
                lblMessage.Text      = "Congratulations You Booked this Property!!";
            }
            else
            {
                lblMessage.ForeColor = System.Drawing.Color.Red;
                lblMessage.Text      = "There is some Problem in registration, Please try again..!!";
            }
        }
        catch (SqlException ex)
        {
            lblMessage.ForeColor = System.Drawing.Color.Red;
            lblMessage.Text      = ex.Message;
        }
        catch (Exception ex)
        {
            lblMessage.ForeColor = System.Drawing.Color.Red;
            lblMessage.Text      = ex.Message;
        }
    }
Beispiel #6
0
    protected void btnPropSubmit_Click(object sender, EventArgs e)
    {
        if (RadioButton1.Checked)
        {
            Rent = RadioButton1.Text;
        }
        else if (RadioButton2.Checked)
        {
            Rent = RadioButton2.Text;
        }
        if (RadioButtonCommercial.Checked)
        {
            category = RadioButtonCommercial.Text;
        }
        else if (RadioButtonResidential.Checked)
        {
            category = RadioButtonResidential.Text;
        }
        string   filePath1 = string.Empty;
        string   filepath2 = string.Empty;
        string   filepath3 = string.Empty;
        string   filepath4 = string.Empty;
        FileInfo fileinfo1 = null;
        FileInfo fileinfo2 = null;
        FileInfo fileinfo3 = null;
        FileInfo fileinfo4 = null;

        if (FileUpload1.FileName.Length > 0)
        {
            filePath1 = "~\\Uploads\\" + FileUpload1.FileName;
            fileinfo1 = new FileInfo(FileUpload1.FileName);
        }
        if (fileinfo1 != null)
        {
            if (fileinfo1.Extension == ".JPEG" || fileinfo1.Extension == ".jpeg" || fileinfo1.Extension == ".JPG" || fileinfo1.Extension == ".jpg" || fileinfo1.Extension == ".jpeg" || fileinfo1.Extension == ".GIF" || fileinfo1.Extension == ".gif")
            {
                filePath1 = "~\\Uploads\\" + FileUpload1.FileName;
                FileUpload1.PostedFile.SaveAs(Server.MapPath(filePath1));
            }
        }
        if (FileUpload2.FileName.Length > 0)
        {
            filepath2 = "~\\Uploads\\" + FileUpload2.FileName;
            fileinfo2 = new FileInfo(FileUpload2.FileName);
        }
        if (fileinfo2 != null)
        {
            if (fileinfo2.Extension == ".JPEG" || fileinfo2.Extension == ".jpeg" || fileinfo2.Extension == ".JPG" || fileinfo2.Extension == ".jpg" || fileinfo2.Extension == ".jpeg" || fileinfo2.Extension == ".GIF" || fileinfo2.Extension == ".gif")
            {
                FileUpload2.PostedFile.SaveAs(Server.MapPath(filepath2));
            }
        }
        if (FileUpload3.FileName.Length > 0)
        {
            filepath3 = "~\\Uploads\\" + FileUpload3.FileName;
            fileinfo3 = new FileInfo(FileUpload3.FileName);
        }
        if (fileinfo3 != null)
        {
            if (fileinfo3.Extension == ".JPEG" || fileinfo3.Extension == ".jpeg" || fileinfo3.Extension == ".JPG" || fileinfo3.Extension == ".jpg" || fileinfo3.Extension == ".jpeg" || fileinfo3.Extension == ".GIF" || fileinfo3.Extension == ".gif")
            {
                FileUpload3.PostedFile.SaveAs(Server.MapPath(filepath3));
            }
        }
        if (FileUpload4.FileName.Length > 0)
        {
            filepath4 = "~\\Uploads\\" + FileUpload4.FileName;
            fileinfo4 = new FileInfo(FileUpload4.FileName);
        }
        if (fileinfo4 != null)
        {
            if (fileinfo4.Extension == ".JPEG" || fileinfo4.Extension == ".jpeg" || fileinfo4.Extension == ".JPG" || fileinfo4.Extension == ".jpg" || fileinfo4.Extension == ".jpeg" || fileinfo4.Extension == ".GIF" || fileinfo4.Extension == ".gif")
            {
                FileUpload4.PostedFile.SaveAs(Server.MapPath(filepath4));
            }
        }
        try
        {
            SqlParameter[] parameter =
            {
                new SqlParameter("@Property_Name", txtPropertyName.Text),
                new SqlParameter("@Address",       txtPropAddress.Text),
                new SqlParameter("@Image1",        filePath1),
                new SqlParameter("@Image2",        filepath2),
                new SqlParameter("@Image3",        filepath3),
                new SqlParameter("@Image4",        filepath4),
                new SqlParameter("@BHK",           txtPropBHK.Text),
                new SqlParameter("@Floor",         txtPropFloor.Text),
                new SqlParameter("@Washroom",      txtPropWashroom.Text),
                new SqlParameter("@Bedroom",       PropBedroom.Text),
                new SqlParameter("@Hall",          txtPropHall.Text),
                new SqlParameter("@Kitchen",       txtPropKitchen.Text),
                new SqlParameter("@Description",   txtDescription.Text),
                new SqlParameter("@Price",         txtPrice.Text),
                new SqlParameter("@Booking_Price", txtBook.Text),
                new SqlParameter("@Rent",          Rent),
                new SqlParameter("@Rent_amount",   ttxtRentAmount.Text),
                new SqlParameter("@Duration",      txtDuration.Text),
                new SqlParameter("@Agreement",     txtAgreemnet.Text),
                new SqlParameter("@category",      category),
                new SqlParameter("@Locality",      txtLocality.Text),
                new SqlParameter("@Pin",           txtArea.Text)
            };
            int i = db.ExecuteNonQueryByProc("insert_PropertyInfo", parameter);
            if (i > 0)
            {
                lnkButton.ForeColor = System.Drawing.Color.Red;
                lnkButton.Text      = "Property Details are submitted Successfully..!!";
                //Button1.Visible = true;
            }
            else
            {
                lnkButton.ForeColor = System.Drawing.Color.Red;
                lnkButton.Text      = "There is some Problem in Submission, Please try again..!!";
            }
        }

        catch (SqlException ex)
        {
            lnkButton.ForeColor = System.Drawing.Color.Red;
            lnkButton.Text      = ex.Message;
        }
        catch (Exception ex)
        {
            lnkButton.ForeColor = System.Drawing.Color.Red;
            lnkButton.Text      = ex.Message;
        }
    }