/// <summary> /// code to edit plan details... /// </summary> /// <param name="ids"></param> /// <param name="emi"></param> /// <param name="totalEmi"></param> /// <returns></returns> public static int EditPlansDetails(int ids, int planname, decimal totalEmi, decimal emi, decimal tax, decimal taxedamount, decimal monthlyamount, decimal totalamount, decimal price) { try { using (var objdata = new HavanadataclassesDataContext()) { tblPlanCharge plnchrge = objdata.tblPlanCharges.Where(x => x.Id == ids).FirstOrDefault(); if (plnchrge != null) { plnchrge.PlanId = Convert.ToInt32(planname); plnchrge.EMI = emi; plnchrge.Total_EMI = totalEmi; plnchrge.Tax = tax; plnchrge.Taxed_Amount = taxedamount; plnchrge.Monthly_Amount = monthlyamount; plnchrge.Total_Amount = totalamount; plnchrge.Price = price; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to update user profile /// </summary> /// <param name="ids"></param> /// <param name="pin"></param> /// <param name="state"></param> /// <param name="city"></param> /// <param name="address"></param> /// <returns></returns> public static int updateuserprofile(int ids, string state, string city, string address, long pin, DateTime dob, string img) { try { using (var objdata = new HavanadataclassesDataContext()) { tblprofile profile = objdata.tblprofiles.Where(x => x.RegId == ids).FirstOrDefault(); if (profile != null) { profile.State = state; profile.City = city; profile.Address = address; profile.Pin = pin; profile.DOB = dob; profile.Picture = img; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code for updation of property details /// </summary> /// <param name="ids"></param> /// <param name="price"></param> /// <param name="_for"></param> /// <returns></returns> public static int updatePropertyDetails(int ids, string add, long price, int bed, int bath, long area, string _for, int flat) { try { using (var objdata = new HavanadataclassesDataContext()) { tblProperty property = objdata.tblProperties.Where(x => x.Id == ids).FirstOrDefault(); if (property != null) { property.Address = add; property.Bedroom = bed; property.Bathroom = bath; property.Area = area; property.Price = Convert.ToInt64(price); property.For = _for; property.FlatId = flat; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code for user KYC details /// </summary> /// <param name="kyc"></param> /// <returns></returns> public static int userKYCdetails(tblkyc kyc) { try { using (var objdata = new HavanadataclassesDataContext()) { kyc.Crdt = DateTime.Now; kyc.Updt = DateTime.Now; kyc.IsActive = true; objdata.tblkycs.InsertOnSubmit(kyc); objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to insert feedback /// </summary> /// <param name="feedbck"></param> /// <returns></returns> public static int feedback(tblfeedback feedbck) { try { using (var objdata = new HavanadataclassesDataContext()) { feedbck.Crdt = DateTime.Now; feedbck.Updt = DateTime.Now; feedbck.IsActive = true; objdata.tblfeedbacks.InsertOnSubmit(feedbck); objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
public static int PropertyUpdation(tblProperty property) { try { using (var objdata = new HavanadataclassesDataContext()) { property.Crdt = DateTime.Now; property.Updt = DateTime.Now; property.IsActive = true; objdata.tblProperties.InsertOnSubmit(property); objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to insert data in emi mode /// </summary> /// <param name="emimode"></param> /// <returns></returns> public static int EMImode(tblEmiMode emimode) { try { using (var objdata = new HavanadataclassesDataContext()) { emimode.Crdt = DateTime.Now; emimode.Updt = DateTime.Now; emimode.IsActive = true; objdata.tblEmiModes.InsertOnSubmit(emimode); objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to rply to the feedback /// </summary> /// <param name="fdrply"></param> /// <returns></returns> public static int rplyfeedback(FeebackRply fdrply) { try { using (var objdata = new HavanadataclassesDataContext()) { fdrply.Crdt = DateTime.Now; fdrply.Updt = DateTime.Now; fdrply.IsActive = true; objdata.FeebackRplies.InsertOnSubmit(fdrply); objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code for contactUs /// </summary> /// <param name="contact"></param> /// <returns></returns> public static int ContactUs(tblcontactus contact) { try { using (var objdata = new HavanadataclassesDataContext()) { contact.Crdt = DateTime.Now; contact.Updt = DateTime.Now; contact.IsActive = true; objdata.tblcontactus.InsertOnSubmit(contact); objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code for insertion of blocks /// </summary> /// <param name="block"></param> /// <returns></returns> public static int insertblocks(tblblockcategory block) { try { using (var objdata = new HavanadataclassesDataContext()) { block.Crdt = DateTime.Now; block.Updt = DateTime.Now; block.IsActive = true; objdata.tblblockcategories.InsertOnSubmit(block); objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code for user's bank details /// </summary> /// <param name="bnk"></param> /// <returns></returns> public static int userBankdetails(tblbank bnk) { try { using (var objdata = new HavanadataclassesDataContext()) { bnk.Crdt = DateTime.Now; bnk.Updt = DateTime.Now; bnk.IsActive = true; objdata.tblbanks.InsertOnSubmit(bnk); objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to rply contact /// </summary> /// <param name="rply"></param> /// <returns></returns> public static int Rply(tblrplycontact rply) { try { using (var objdata = new HavanadataclassesDataContext()) { rply.Crdt = DateTime.Now; rply.Updt = DateTime.Now; rply.IsActive = true; objdata.tblrplycontacts.InsertOnSubmit(rply); objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code for user profile updation /// </summary> /// <param name="profile"></param> /// <returns></returns> public static int userprofileinsertion(tblprofile profile) { try { using (var objdata = new HavanadataclassesDataContext()) { profile.Updt = DateTime.Now; profile.Crdt = DateTime.Now; profile.IsActive = false; objdata.tblprofiles.InsertOnSubmit(profile); objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to insert plan details..... /// </summary> /// <param name="plancharges"></param> /// <returns></returns> public static int PaymentPlansDetails(tblPlanCharge plancharges) { try { using (var objdata = new HavanadataclassesDataContext()) { plancharges.Crdt = DateTime.Now; plancharges.Updt = DateTime.Now; plancharges.IsActive = true; objdata.tblPlanCharges.InsertOnSubmit(plancharges); objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to delete blocks... /// </summary> /// <param name="ids"></param> /// <returns></returns> public static int DeleteBlock(int ids) { try { using (var objdata = new HavanadataclassesDataContext()) { tblblockcategory blockcatgry = objdata.tblblockcategories.Where(x => x.Id == ids).FirstOrDefault(); if (blockcatgry != null) { blockcatgry.IsActive = false; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to insert no. of flats /// </summary> /// <param name="avlblock"></param> /// <returns></returns> public static int insertNoOFflats(tblavailableblock avlblock) { try { using (var objdata = new HavanadataclassesDataContext()) { avlblock.Crdt = DateTime.Now; avlblock.Updt = DateTime.Now; avlblock.IsActive = true; avlblock.IsBooked = false; objdata.tblavailableblocks.InsertOnSubmit(avlblock); objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// Code for User registration /// </summary> /// <param name="reg"></param> /// <returns></returns> public static int userregistration(tblreg reg) { try { using (var objdata = new HavanadataclassesDataContext()) { reg.Crdt = DateTime.Now; reg.Updt = DateTime.Now; reg.IsActive = false; reg.IsVerified = false; objdata.tblregs.InsertOnSubmit(reg); objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to change password on mail.... /// </summary> /// <param name="ids"></param> /// <param name="password"></param> /// <returns></returns> public static int PasswordChangeOnEmail(string mail, string password) { try { using (var objdata = new HavanadataclassesDataContext()) { tblreg reg = objdata.tblregs.Where(x => x.Email == mail).FirstOrDefault(); if (reg != null) { reg.Password = password; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code for denying users /// </summary> /// <param name="ids"></param> public static int denyingusers(int ids) { try { using (var objdata = new HavanadataclassesDataContext()) { tblreg reg = objdata.tblregs.Where(x => x.Id == ids).FirstOrDefault(); if (reg != null) { reg.IsVerified = false; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to delete plan details /// </summary> /// <param name="ids"></param> /// <returns></returns> public static int DeletePlanDetails(int ids) { try { using (var objdata = new HavanadataclassesDataContext()) { tblPlanCharge objplancharge = objdata.tblPlanCharges.Where(x => x.Id == ids).FirstOrDefault(); if (objplancharge != null) { objplancharge.IsActive = false; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to delete feedbacks.... /// </summary> /// <param name="ids"></param> /// <returns></returns> public static int DeleteFeedbacks(int ids) { try { using (var objdata = new HavanadataclassesDataContext()) { tblfeedback fdbck = objdata.tblfeedbacks.Where(x => x.Id == ids).FirstOrDefault(); if (fdbck != null) { fdbck.IsActive = false; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to delete contactus reply... /// </summary> /// <param name="ids"></param> /// <returns></returns> public static int DeleteContactUsReply(int ids) { try { using (var objdata = new HavanadataclassesDataContext()) { tblcontactus contactus = objdata.tblcontactus.Where(x => x.Id == ids).FirstOrDefault(); if (contactus != null) { contactus.IsActive = false; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to edit block name /// </summary> /// <param name="ids"></param> /// <param name="blockname"></param> /// <returns></returns> public static int EditBlockName(int ids, string blockname) { try { using (var objdata = new HavanadataclassesDataContext()) { tblblockcategory block = objdata.tblblockcategories.Where(x => x.Id == ids).FirstOrDefault(); if (block != null) { block.BlockName = blockname.ToString(); } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to edit plans... /// </summary> /// <param name="ids"></param> /// <param name="nameOfPlan"></param> /// <returns></returns> public static int EditPlan(int ids, string nameOfPlan) { try { using (var objdata = new HavanadataclassesDataContext()) { tblPlansMaster objplanmaster = objdata.tblPlansMasters.Where(x => x.Id == ids).FirstOrDefault(); if (objplanmaster != null) { objplanmaster.PlanName = nameOfPlan; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to delete flats... /// </summary> /// <param name="ids"></param> /// <returns></returns> public static int DeleteFlats(int ids) { try { using (var objdata = new HavanadataclassesDataContext()) { tblavailableblock avlblocks = objdata.tblavailableblocks.Where(x => x.Id == ids).FirstOrDefault(); if (avlblocks != null) { avlblocks.IsActive = false; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to delete properties.... /// </summary> /// <param name="ids"></param> /// <returns></returns> public static int DeletePropertiesDetails(int ids) { try { using (var objdata = new HavanadataclassesDataContext()) { tblProperty property = objdata.tblProperties.Where(x => x.Id == ids).FirstOrDefault(); if (property != null) { property.IsActive = false; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to update Profile Picture... /// </summary> /// <param name="ids"></param> /// <param name="img"></param> /// <returns></returns> public static int UpdateProfilePicture(int ids, string img) { try { using (var objdata = new HavanadataclassesDataContext()) { tblprofile pro = objdata.tblprofiles.Where(x => x.RegId == ids).FirstOrDefault(); if (pro != null) { pro.Picture = img ; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code to update bank kyc details /// </summary> /// <param name="ids"></param> /// <param name="panNo"></param> /// <param name="aadhar"></param> /// <returns></returns> public static int updateKYC(int ids, long panNo, long aadhar) { try { using (var objdata = new HavanadataclassesDataContext()) { tblkyc kyc = objdata.tblkycs.Where(x => x.Id == ids).FirstOrDefault(); if (kyc != null) { kyc.Pan = panNo.ToString(); kyc.Aadhaar = Convert.ToInt64(aadhar); } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// code for updation of property details /// </summary> /// <param name="ids"></param> /// <param name="price"></param> /// <param name="_for"></param> /// <returns></returns> public static int updatePropertyDetails(int ids, long price, string _for) { try { using (var objdata = new HavanadataclassesDataContext()) { tblProperty property = objdata.tblProperties.Where(x => x.Id == ids).FirstOrDefault(); if (property != null) { property.Price = Convert.ToInt64(price); property.For = _for; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }
/// <summary> /// /// code to edit flats name /// </summary> /// <param name="ids"></param> /// <param name="flatname"></param> /// <returns></returns> public static int EditFlatsName(int ids, int flatname, int BlockId) { try { using (var objdata = new HavanadataclassesDataContext()) { tblavailableblock avlblock = objdata.tblavailableblocks.Where(x => x.Id == ids).FirstOrDefault(); if (avlblock != null) { avlblock.BlockNo = flatname; avlblock.BlockId = BlockId; } objdata.SubmitChanges(); return(1); } } catch (Exception ex) { throw ex; } }