Пример #1
0
 void AddEmiModes()
 {
     try
     {
         emimode.PropertyId   = Convert.ToInt32(ddlproperty.SelectedValue);
         emimode.PlanMasterId = Convert.ToInt32(ddlplanmaster.SelectedValue);
         emimode.PlanChargeId = Convert.ToInt32(ddlplancharges.SelectedValue);
         emimode.Mode         = Convert.ToInt32(ddlmodes.SelectedValue);
         emimode.Installment  = Convert.ToInt32(txtinstallment.Value);
         emimode.Amount       = Convert.ToDecimal(txtEmiAMt.Value);
         int Issuccessfull = InsertionLayer.EMImode(emimode);
         if (Issuccessfull == 1)
         {
             lblmsg.Text = "You have Successfully Added The Plan Details..";
             clearSection();
         }
         else
         {
             lblmsg.Text = "Failed... Please Try Again Later...";
         }
     }
     catch (Exception ex)
     {
         lblmsg.Text = ex.Message;
     }
 }
Пример #2
0
        void insertflats()
        {
            try
            {
                for (int i = 1; i <= Convert.ToInt32(txtflats.Value); i++)
                {
                    tblavailableblock avlblock = new tblavailableblock();

                    avlblock.BlockId = Convert.ToInt32(ddlflats.SelectedValue);
                    avlblock.BlockNo = i;
                    int ISSuccessfull = InsertionLayer.insertNoOFflats(avlblock);
                    if (ISSuccessfull == 1)
                    {
                        lblmsg.Text = "You Have Successfully Added The Flat In  " + ddlflats.SelectedItem.Text;
                        BindFlatsList();
                    }
                    else
                    {
                        lblmsg.Text = "Technical error Please Try After Sometime";
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #3
0
        /// <summary>
        /// code to give feedback...
        /// </summary>

        void feedback()
        {
            try
            {
                fdbck.Name      = txtname.Value;
                fdbck.Email     = txtemail.Value;
                fdbck.ContactNo = Convert.ToInt64(txtnum.Value);
                fdbck.Msg       = txtmsg.Value;
                fdbck.Rating    = Convert.ToChar(rbl.SelectedValue);
                int Issucessfull = InsertionLayer.feedback(fdbck);
                if (Issucessfull == 1)
                {
                    lblmsg.Text = "We Appreciate for Your Proper Feedback...";
                    clearsection();
                }
                else
                {
                    lblmsg.Text = "Technical Error ! Please try After Sometime";
                }
            }
            catch (Exception ex)
            {
                lblmsg.Text = ex.Message;
            }
        }
Пример #4
0
 /// <summary>
 /// code to add plan Details....
 /// </summary>
 void AddPlansDetails()
 {
     try
     {
         objplanCharges.PlanId         = Convert.ToInt32(ddlplans.SelectedValue);
         objplanCharges.EMI            = Convert.ToInt32(txtEMI.Value);
         objplanCharges.Total_EMI      = Convert.ToInt32(txttotalEMI.Text);
         objplanCharges.Tax            = Convert.ToInt32(txtTAX.Text);
         objplanCharges.Taxed_Amount   = Convert.ToInt32(txttaxedamount.Text);
         objplanCharges.Monthly_Amount = Convert.ToInt32(txtsubtotalamt.Text);
         objplanCharges.Total_Amount   = Convert.ToInt32(txttotalamt.Text);
         objplanCharges.Price          = Convert.ToInt32(txtprice.Text);
         int Issuccessfull = InsertionLayer.PaymentPlansDetails(objplanCharges);
         if (Issuccessfull == 1)
         {
             lblmsg.Text = "You have Successfully Added The Plan Details..";
             clearSection();
         }
         else
         {
             lblmsg.Text = "Failed... Please Try Again Later...";
         }
     }
     catch (Exception ex)
     {
         lblmsg.Text = ex.Message;
     }
 }
Пример #5
0
        void registrationcode()
        {
            try
            {
                var q = objlayer.checkifmailorcontactexist(txtemail.Value, Convert.ToInt64(txtcontact.Value));

                if (q.Any())
                {
                    lblmsg.Text = "Email Or Contact Already Exists.Please Try With Another Contact Or Email";
                    lblmsg.Attributes.Add("style", "color:red");
                }
                else
                {
                    if (txtpassword.Value == txtcnfpassword.Value)
                    {
                        reg.RegNo     = Convert.ToString(hdfapp.Value);
                        reg.Name      = txtname.Value;
                        reg.Password  = txtpassword.Value;
                        reg.ContactNo = Convert.ToInt64(txtcontact.Value);
                        reg.Email     = txtemail.Value;
                        int Issuccessfull = InsertionLayer.userregistration(reg);
                        if (Issuccessfull == 1)
                        {
                            lblmsg.Text  = "Registration Was Successfull.Once Registration Approved You can login Into Profile.";
                            lblmsg1.Text = "Your Registration Number Is " + hdfapp.Value + "Keep It For Future Reference.";
                            lblmsg.Attributes.Add("style", "color:green");
                            txtname.Value        = "";
                            txtpassword.Value    = "";
                            txtemail.Value       = "";
                            txtcontact.Value     = "";
                            txtcnfpassword.Value = "";
                        }
                        else
                        {
                            lblmsg.Text = "Technical Error.Try After Sometime";
                            lblmsg.Attributes.Add("style", "color:red");
                        }
                    }
                    else
                    {
                        lblmsg.Text = "Password Do Not Match";
                        lblmsg.Attributes.Add("style", "color:red");
                    }
                }
            }
            catch (Exception ex)
            {
                lblmsg.Text = ex.Message;
                lblmsg.Attributes.Add("style", "color:red");
            }
        }
Пример #6
0
        /// <summary>
        /// code for bank details updation
        /// </summary>

        void SubmitBankdetails()
        {
            try
            {
                bnk.RegId      = Convert.ToInt32(Session["Id"]);
                bnk.BankName   = txtbank.Value;
                bnk.BankBranch = txtbranch.Value;
                bnk.IFSC       = txtifsc.Value;
                bnk.AccountNo  = Convert.ToInt64(txtacc.Value);
                InsertionLayer.userBankdetails(bnk);
                clearselection();
                lblmsg.Text = "Your Bank Details Has Been Updated Successfully";
            }
            catch (Exception ex)
            {
                lblmsg.Text      = ex.Message;
                lblmsg.ForeColor = System.Drawing.Color.Red;
            }
        }
Пример #7
0
        /// <summary>
        /// code for kyc updation
        /// </summary>

        void updateKYC()
        {
            try
            {
                kyc.RegId = Convert.ToInt32(Session["Id"]);
                kyc.Pan   = txtPAN.Value;
                string x = txtAadhar1.Value;
                string y = txtAadhar2.Value;
                string z = txtAadhar3.Value;
                string a = x + y + z;
                kyc.Aadhaar = Convert.ToInt64(a);
                InsertionLayer.userKYCdetails(kyc);
                clearselection();
                lblmsg.Text = "Your KYC Has Been Updated Successfully";
            }
            catch (Exception ex)
            {
                lblmsg.Text      = ex.Message;
                lblmsg.ForeColor = System.Drawing.Color.Red;
            }
        }
Пример #8
0
 /// <summary>
 /// code to reply to the user...
 /// </summary>
 void rply()
 {
     try
     {
         objrply.RplyId = Convert.ToInt32(Request.QueryString["Id"]);
         objrply.Rply   = txtrply.Value;
         int Issucessfull = InsertionLayer.rplyfeedback(objrply);
         if (Issucessfull == 1)
         {
             lblmsg.Text = "You Have Replied To " + txtnme.Value;
             clearSection();
         }
         else
         {
             lblmsg.Text = "Failed... Please try again Later...";
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #9
0
 /// <summary>
 /// code to rply
 /// </summary>
 void rply()
 {
     try
     {
         objrply.ContactId = Convert.ToInt32(Request.QueryString["Id"]);
         objrply.Rply      = txtrply.Value;
         int Issuccessfull = InsertionLayer.Rply(objrply);
         if (Issuccessfull == 1)
         {
             lblmsg.Text = "You have Replied To " + txtname.Value;
             clearSection();
         }
         else
         {
             lblmsg.Text = "Technical Error !! Try After Sometime";
         }
     }
     catch (Exception ex)
     {
         lblmsg.Text = ex.Message;
     }
 }
Пример #10
0
 /// <summary>
 /// code to add Payment plans ...
 /// </summary>
 void AddPlans()
 {
     try
     {
         objplanmaster.PlanName   = txtplan.Value;
         objplanmaster.PropertyId = Convert.ToInt32(ddlproperties.SelectedValue);
         int Issuccessfull = InsertionLayer.PaymentPlans(objplanmaster);
         if (Issuccessfull == 1)
         {
             lblmsg.Text   = "Your Plan Have Successfully Submitted....";
             txtplan.Value = "";
         }
         else
         {
             lblmsg.Text = "Your Plan Have Not Submitted ... Please Try Again Later...";
         }
     }
     catch (Exception ex)
     {
         lblmsg.Text = ex.Message;
     }
 }
Пример #11
0
        /// <summary>
        /// code to insert block details
        /// </summary>
        void insertblock()
        {
            try
            {
                block.BlockName = txtblock.Value;

                int issuccessfull = InsertionLayer.insertblocks(block);
                if (issuccessfull == 1)
                {
                    lblmsg.Text = "You have Successfully Added The Block With Name  "
                                  + txtblock.Value;
                    bindblocklist();
                }
                else
                {
                    lblmsg.Text = "Technical Error Please Try After Sometime";
                }
                txtblock.Value = "";
            }
            catch (Exception ex)
            {
                lblmsg.Text = ex.Message;
            }
        }
Пример #12
0
 /// <summary>
 /// code to insert details in ContactUs form
 /// </summary>
 void ContactUs()
 {
     try
     {
         contact.Name    = txtname.Value;
         contact.Message = txtmsg.Value;
         contact.Email   = txtmail.Value;
         contact.Contact = Convert.ToInt64(txtno.Value);
         int Issuccessfull = InsertionLayer.ContactUs(contact);
         if (Issuccessfull == 1)
         {
             lblmsg.Text = "You Have Successfully Submitted Your Query......";
             ClearSection();
         }
         else
         {
             lblmsg.Text = "Technical Error ! Please try After Sometime";
         }
     }
     catch (Exception ex)
     {
         lblmsg.Text = ex.Message;
     }
 }
Пример #13
0
        /// <summary>
        /// code for properties updation
        /// </summary>

        void updateproperties()
        {
            string s1 = "";

            try
            {
                string FileName = "";
                string FilePath = "~/Admin/img/Properties/";

                if (txtimg.PostedFile.ContentLength > 0 && txtimg.PostedFile != null)
                {
                    FileName = Guid.NewGuid().ToString() + Path.GetExtension(txtimg.FileName);
                    string Extension = Path.GetExtension(txtimg.FileName);
                    int    Length    = txtimg.PostedFile.ContentLength;
                    s1 = FilePath + FileName;
                    #region checking out File Length

                    if (Length <= 1000000)
                    {
                        #region Checking file Extensions
                        switch (Extension.ToLower())
                        {
                            #region When File Extension Is .JPG

                        case ".jpg":
                            txtimg.SaveAs(Server.MapPath(FilePath + FileName));
                            property.FlatId   = Convert.ToInt32(ddlflats.SelectedValue);
                            property.Image    = s1;
                            property.For      = ddlfor.SelectedValue;
                            property.Bathroom = Convert.ToInt32(txtwashrooms.Value);
                            property.Bedroom  = Convert.ToInt32(txtbed.Value);
                            property.Address  = txtaddress.Value;
                            property.Area     = Convert.ToInt64(txtarea.Value);
                            property.Price    = Convert.ToInt32(txtprice.Value);
                            InsertionLayer.PropertyUpdation(property);
                            lblmsg.Text      = "Property Uploaded Successfully.";
                            lblmsg.ForeColor = System.Drawing.Color.BlueViolet;
                            clearsection();
                            // img1.ImageUrl = FilePath + FileName;


                            break;

                            #endregion


                            #region When File Extension Is .JPEG

                        case ".jpeg":
                            txtimg.SaveAs(Server.MapPath(FilePath + FileName));
                            property.Image    = s1;
                            property.FlatId   = Convert.ToInt32(ddlflats.SelectedValue);
                            property.For      = ddlfor.SelectedValue;
                            property.Bathroom = Convert.ToInt32(txtwashrooms.Value);
                            property.Bedroom  = Convert.ToInt32(txtbed.Value);
                            property.Address  = txtaddress.Value;
                            property.Area     = Convert.ToInt64(txtarea.Value);
                            property.Price    = Convert.ToInt32(txtprice.Value);
                            InsertionLayer.PropertyUpdation(property);
                            lblmsg.Text      = "Property Uploaded Successfully.";
                            lblmsg.ForeColor = System.Drawing.Color.BlueViolet;
                            clearsection();
                            // img1.ImageUrl = FilePath + FileName;
                            break;

                            #endregion


                            #region When File Extension Is .PNG

                        case ".png":
                            txtimg.SaveAs(Server.MapPath(FilePath + FileName));
                            property.Image    = s1;
                            property.FlatId   = Convert.ToInt32(ddlflats.SelectedValue);
                            property.For      = ddlfor.SelectedValue;
                            property.Bathroom = Convert.ToInt32(txtwashrooms.Value);
                            property.Bedroom  = Convert.ToInt32(txtbed.Value);
                            property.Address  = txtaddress.Value;
                            property.Area     = Convert.ToInt64(txtarea.Value);
                            property.Price    = Convert.ToInt32(txtprice.Value);
                            InsertionLayer.PropertyUpdation(property);
                            lblmsg.Text      = "Property Uploaded Successfully.";
                            lblmsg.ForeColor = System.Drawing.Color.BlueViolet;
                            clearsection();
                            // img1.ImageUrl = FilePath + FileName;
                            break;

                            #endregion

                        default:
                            lblmsg.Text      = "Only jpg jpeg and png file accepted";
                            lblmsg.ForeColor = System.Drawing.Color.Red;
                            break;
                        }

                        #endregion
                    }
                    else
                    {
                        lblmsg.Text      = "File must be  less than 1 mb";
                        lblmsg.ForeColor = System.Drawing.Color.Red;
                    }
                    #endregion
                }
                else
                {
                    lblmsg.Text      = "please choose the file";
                    lblmsg.ForeColor = System.Drawing.Color.Red;
                }
            }
            catch (Exception ex)
            {
                lblmsg.Text      = ex.Message;
                lblmsg.ForeColor = System.Drawing.Color.Red;
            }
        }
Пример #14
0
        /// <summary>
        /// code to insert profile details...
        /// </summary>
        void profileInsertion()
        {
            string s1 = "";

            try
            {
                string FileName = "";
                string FilePath = "Userprofilepictures/";

                if (txtimg.PostedFile.ContentLength > 0 && txtimg.PostedFile != null)
                {
                    FileName = Guid.NewGuid().ToString() + Path.GetExtension(txtimg.FileName);
                    string Extension = Path.GetExtension(txtimg.FileName);
                    int    Length    = txtimg.PostedFile.ContentLength;
                    s1 = FilePath + FileName;
                    #region checking out File Length

                    if (Length <= 1000000)
                    {
                        #region Checking file Extensions

                        switch (Extension.ToLower())
                        {
                            #region When File Extension Is .JPG

                        case ".jpg":
                            txtimg.SaveAs(Server.MapPath(FilePath + FileName));
                            profile.RegId   = Convert.ToInt32(Session["Id"]);
                            profile.Picture = s1;
                            profile.Gender  = Convert.ToChar(ddlgender.SelectedValue);
                            profile.State   = txtstate.Value;
                            profile.City    = txtcity.Value;
                            profile.Address = txtaddress.Value;
                            profile.Pin     = Convert.ToInt64(txtpincode.Value);
                            profile.DOB     = Convert.ToDateTime(txtdob.Value);
                            InsertionLayer.userprofileinsertion(profile);
                            lblmsg.Text      = "Profile Updated Successfully.";
                            lblmsg.ForeColor = System.Drawing.Color.Green;
                            clearsection();
                            // img1.ImageUrl = FilePath + FileName;


                            break;

                            #endregion


                            #region When File Extension Is .JPEG

                        case ".jpeg":
                            txtimg.SaveAs(Server.MapPath(FilePath + FileName));
                            profile.RegId   = Convert.ToInt32(Session["Id"]);
                            profile.Picture = s1;
                            profile.Gender  = Convert.ToChar(ddlgender.SelectedItem.Text);
                            profile.State   = txtstate.Value;
                            profile.City    = txtcity.Value;
                            profile.Address = txtaddress.Value;
                            profile.Pin     = Convert.ToInt64(txtpincode.Value);
                            profile.DOB     = Convert.ToDateTime(txtdob.Value);
                            InsertionLayer.userprofileinsertion(profile);
                            lblmsg.Text      = "Profile Updated Successfully.";
                            lblmsg.ForeColor = System.Drawing.Color.Green;
                            // img1.ImageUrl = FilePath + FileName;
                            clearsection();
                            break;

                            #endregion


                            #region When File Extension Is .PNG

                        case ".png":
                            txtimg.SaveAs(Server.MapPath(FilePath + FileName));
                            profile.RegId   = Convert.ToInt32(Session["Id"]);
                            profile.Picture = s1;
                            profile.Gender  = Convert.ToChar(ddlgender.SelectedItem.Text);
                            profile.State   = txtstate.Value;
                            profile.City    = txtcity.Value;
                            profile.Address = txtaddress.Value;
                            profile.Pin     = Convert.ToInt64(txtpincode.Value);
                            profile.DOB     = Convert.ToDateTime(txtdob.Value);
                            InsertionLayer.userprofileinsertion(profile);
                            lblmsg.Text      = "Profile Updated Successfully.";
                            lblmsg.ForeColor = System.Drawing.Color.Green;
                            clearsection();
                            // img1.ImageUrl = FilePath + FileName;
                            break;

                            #endregion

                        default:
                            lblmsg.Text      = "Only jpg jpeg and png file accepted";
                            lblmsg.ForeColor = System.Drawing.Color.Red;
                            break;
                        }

                        #endregion
                    }
                    else
                    {
                        lblmsg.Text      = "File must be  less than 1 mb";
                        lblmsg.ForeColor = System.Drawing.Color.Red;
                    }
                    #endregion
                }
                else
                {
                    profile.RegId   = Convert.ToInt32(Session["Id"]);
                    profile.Picture = "img/avatar.png";
                    profile.Gender  = Convert.ToChar(ddlgender.SelectedValue);
                    profile.State   = txtstate.Value;
                    profile.City    = txtcity.Value;
                    profile.Address = txtaddress.Value;
                    profile.Pin     = Convert.ToInt64(txtpincode.Value);
                    profile.DOB     = Convert.ToDateTime(txtdob.Value);
                    InsertionLayer.userprofileinsertion(profile);
                    lblmsg.Text      = "Profile Updated Successfully.";
                    lblmsg.ForeColor = System.Drawing.Color.Green;
                    clearsection();
                }
            }
            catch (Exception ex)
            {
                lblmsg.Text      = ex.Message;
                lblmsg.ForeColor = System.Drawing.Color.Red;
            }
        }