protected void lnkactivate_Command(object sender, CommandEventArgs e) { int Ids = Convert.ToInt32(e.CommandArgument); Editlayer.PendingUsers(Ids); bindPendinguserlist(); }
/// <summary> /// code to delete plan details... /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lnkdelte_Command(object sender, CommandEventArgs e) { int Ids = Convert.ToInt32(e.CommandArgument); Editlayer.DeletePlanDetails(Ids); grdplandetails.DataBind(); }
/// <summary> /// code to change password... /// </summary> void changepassword() { try { if (Convert.ToString(Session["Password"]) == txtold.Value) { Editlayer.PasswordChange(Convert.ToInt32(Session["Id"]), txtnew.Value); lblmsg.Text = "Password Successfully Changed"; Response.Redirect("../Userlogin.aspx"); Session["Id"] = null; Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.Buffer = true; Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d); Response.Expires = -1000; Response.CacheControl = "no-cache"; Session.Clear(); Session.Abandon(); Session.RemoveAll(); } else { lblmsg.Text = "Password Do Not Match"; lblmsg.ForeColor = System.Drawing.Color.Red; } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to delete blocks.. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lnkdelte_Command(object sender, CommandEventArgs e) { int ids = Convert.ToInt32(e.CommandArgument); Editlayer.DeleteBlock(ids); bindblocklist(); }
/// <summary> /// code to update plans name... /// </summary> void UpdatePlans() { try { if (Request.QueryString["Id"] != null) { int IsUpdated = Editlayer.EditPlan(Convert.ToInt32(Request.QueryString["Id"]), txtplan.Value, Convert.ToInt32(ddlproperties.SelectedValue)); if (IsUpdated == 1) { Response.Redirect("Plans.aspx"); } else { lblmsg.Text = "Plans Not Updated"; lblmsg.ForeColor = System.Drawing.Color.Red; } } else { AddPlans(); } } catch (Exception ex) { lblmsg.Text = ex.Message; } }
protected void lnkdelte_Command1(object sender, CommandEventArgs e) { int Ids = Convert.ToInt32(e.CommandArgument); Editlayer.DeletePlan(Ids); bindplans(); }
protected void lnkdeactivate_Command(object sender, CommandEventArgs e) { int Ids = Convert.ToInt32(e.CommandArgument); Editlayer.DeleteContactUsReply(Ids); bindcontactUs(); }
protected void lnkdelte_Command(object sender, CommandEventArgs e) { int Ids = Convert.ToInt32(e.CommandArgument); Editlayer.DeletePropertiesDetails(Ids); bindpropertylist(); }
/// <summary> /// code to delete feedbacks.. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lnkdeactivate_Command(object sender, CommandEventArgs e) { int Ids = Convert.ToInt32(e.CommandArgument); Editlayer.DeleteFeedbacks(Ids); bindFeedback(); }
protected void lnkdeny_Command(object sender, CommandEventArgs e) { int Ids = Convert.ToInt32(e.CommandArgument); Editlayer.denyingusers(Ids); bindverifieduserlist(); }
/// <summary> /// code for editing the propert details /// </summary> void EditpropertyDetails() { try { if (Request.QueryString["Id"] != null) { int IsUpdated = Editlayer.updatePropertyDetails(Convert.ToInt32(Request.QueryString["Id"]), txtaddress.Value, Convert.ToInt64(txtprice.Value), Convert.ToInt32(txtbed.Value), Convert.ToInt32(txtwashrooms.Value), Convert.ToInt64(txtarea.Value), ddlfor.SelectedValue, Convert.ToInt32(ddlflats.SelectedValue)); if (IsUpdated == 1) { Response.Redirect("Update-Properties"); } else { lblmsg.Text = "Property Not Updated"; lblmsg.ForeColor = System.Drawing.Color.Red; } } else { updateproperties(); } } catch (Exception ex) { lblmsg.Text = ex.Message; lblmsg.ForeColor = System.Drawing.Color.Red; } }
void updateBankDetails() { try { Editlayer.updateBankDetails(Convert.ToInt32(Session["Id"]), Convert.ToInt64(txtacc.Value), txtbranch.Value, txtifsc.Value, txtbank.Value); } catch (Exception ex) { lblmsg.Text = ex.Message; lblmsg.ForeColor = System.Drawing.Color.Red; lblmsg.Visible = true; } }
protected void btnchangepasword_Click(object sender, EventArgs e) { try { string no = ""; string name = ""; var q = objlogin.ForgotPassword(txtuserid.Value); if (q.Any()) { string Password = Guid.NewGuid().ToString().Substring(0, 10); foreach (tblreg k in q) { no = Convert.ToInt64(k.ContactNo).ToString(); name = k.Name; } string filepath = Server.MapPath("Forget.html"); string datetime = DateTime.Now.ToString(); string year = DateTime.Now.Year.ToString(); int Issuccess = MailAccessLayer.ForgotPassword(txtuserid.Value, name, name, no, datetime, filepath, year, Password); if (Issuccess == 1) { Editlayer.PasswordChangeOnEmail(txtuserid.Value, Password); lblmsg.Text = "Mail has been send successfully ..."; } else { lblmsg.Text = "Technical Error Please try again later..."; } lblmsg.Visible = true; lblmsg.Focus(); } else { lblmsg.Text = "Please Enter a Valid Email-Id..."; } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to edit plans details.... /// </summary> void EditPlansdetails() { try { if (Request.QueryString["Id"] != null) { int updated = Editlayer.EditPlansDetails(Convert.ToInt32(Request.QueryString["Id"]), Convert.ToInt32(ddlplans.SelectedValue), Convert.ToDecimal(txttotalEMI.Text), Convert.ToDecimal(txtEMI.Value), Convert.ToDecimal(txtTAX.Text), Convert.ToDecimal(txttaxedamount.Text), Convert.ToDecimal(txtsubtotalamt.Text), Convert.ToDecimal(txttotalamt.Text), Convert.ToDecimal(txtprice.Text)); if (updated == 1) { Response.Redirect("Plan-Details"); } else { lblmsg.Text = "Plan Details Not Updated"; lblmsg.ForeColor = System.Drawing.Color.Red; } } } catch (Exception ex) { throw ex; } }
void EditFlatName() { try { if (Request.QueryString["Id"] != null) { int IsUpdated = Editlayer.EditFlatsName(Convert.ToInt32(Request.QueryString["Id"]), Convert.ToInt32(txtflats.Value), Convert.ToInt32(ddlflats.SelectedValue)); if (IsUpdated == 1) { Response.Redirect("Add-Flats"); } else { lblmsg.Text = "Flat Name Not Updated"; lblmsg.ForeColor = System.Drawing.Color.Red; } } } catch (Exception ex) { lblmsg.Text = ex.Message; lblmsg.ForeColor = System.Drawing.Color.Red; } }
/// <summary> /// code to edit block names /// </summary> /// void EditBlockName() { try { if (Request.QueryString["Id"] != null) { int IsUpdated = Editlayer.EditBlockName(Convert.ToInt32(Request.QueryString["Id"]), txtblock.Value); if (IsUpdated == 1) { Response.Redirect("Update-Blocks"); } else { lblmsg.Text = "Block Name Not Updated"; lblmsg.ForeColor = System.Drawing.Color.Red; } } } catch (Exception ex) { lblmsg.Text = ex.Message; lblmsg.ForeColor = System.Drawing.Color.Red; } }
/// <summary> /// code to update KYC details /// </summary> void EditKYC() { hdf.Value = txtAadhar1.Value + txtAadhar2.Value + txtAadhar3.Value; Editlayer.EditKYCDetails(Convert.ToInt32(Session["Id"]), txtPAN.Value, Convert.ToInt64(hdf.Value)); }
/// <summary> /// code to update profile picture... /// </summary> void updateprofilePicture() { try { string FileName = ""; string FilePath = "Userprofilepictures/"; string PreviousFile = objshow.GetFileNameOnRegId(Convert.ToInt32(Session["Id"])); string MapPath = Server.MapPath(PreviousFile); if (txtimg.PostedFile.ContentLength > 0 && txtimg.PostedFile != null) { if (File.Exists(MapPath)) { File.Delete(MapPath); } FileName = Guid.NewGuid().ToString() + Path.GetExtension(txtimg.FileName); string Extension = Path.GetExtension(txtimg.FileName); int Length = txtimg.PostedFile.ContentLength; string 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)); Editlayer.UpdateProfilePicture(Convert.ToInt32(Session["Id"]), s1); lblmsg.Text = "Profile Updated Successfully."; lblmsg.ForeColor = System.Drawing.Color.Green; profileimg.Src = s1; break; #endregion #region When File Extension Is .JPEG case ".jpeg": txtimg.SaveAs(Server.MapPath(FilePath + FileName)); Editlayer.UpdateProfilePicture(Convert.ToInt32(Session["Id"]), s1); lblmsg.Text = "Profile Updated Successfully."; lblmsg.ForeColor = System.Drawing.Color.Green; profileimg.Src = s1; break; #endregion #region When File Extension Is .PNG case ".png": txtimg.SaveAs(Server.MapPath(FilePath + FileName)); Editlayer.UpdateProfilePicture(Convert.ToInt32(Session["Id"]), s1); lblmsg.Text = "Profile Updated Successfully."; lblmsg.ForeColor = System.Drawing.Color.Green; profileimg.Src = s1; 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 = "Upload Failed.."; lblmsg.ForeColor = System.Drawing.Color.Red; } } catch (Exception ex) { lblmsg.Text = ex.Message; } }