public void MainUpdate(Web.ViewModel.PropertyManagement.CaptureListing.NewListingView model, int id) { int Id = UpdatePropertyListing(model.PropertyListingView, id); UpdatePropertyAgents(model.PropertyListingAgentsView, Id); UpdateListingDetail(model.PropertyListingDetailView, Id); UpdateYoutubeLibrary(model.PropertyListingYoutubeView, Id); UpdatePropertyFeatures(model.PropertyListingFeatureView, Id); }
public int MainInsert(Web.ViewModel.PropertyManagement.CaptureListing.NewListingView model, FormCollection collection) { int Id = CaptureListing(model.PropertyListingView); CaptureListingAgents(model.PropertyListingAgentsView, Id); CaptureListingDetail(model.PropertyListingDetailView, Id); CaptureYoutubeLibrary(model.PropertyListingYoutubeView, Id); CapturePropertyListingFeatures(model.PropertyListingFeatureView, Id, collection); return(Id); }
public List <PropertyImagesView> GetPropertyImages(Web.ViewModel.PropertyManagement.CaptureListing.NewListingView model, int PropertyId) { using (JazMax.DataAccess.JazMaxDBProdContext db = new DataAccess.JazMaxDBProdContext()) { var query = (from a in db.BlobCoreStorages join b in db.PropertyImages on a.BlobId equals b.BlobId where b.PropertyListingId == PropertyId select new PropertyImagesView { BlobId = a.BlobId, BlobImagePath = a.BlobUrl, PropertyListingId = PropertyId }).ToList(); return(query); } }
public List <PropertyListingFeatureView> GetFeatureOverview(Web.ViewModel.PropertyManagement.CaptureListing.NewListingView model, int PropertyId) { using (JazMax.DataAccess.JazMaxDBProdContext db = new DataAccess.JazMaxDBProdContext()) { var query = (from a in db.ProprtyListingFeatures join b in db.PropertyFeatures on a.PropertyFeatureId equals b.PropertyFeatureId where a.PropertyListingId == PropertyId select new PropertyListingFeatureView { ProprtyListingFeaturesId = a.ProprtyListingFeaturesId, PropertyListingId = PropertyId, PropertyFeatureId = a.PropertyFeatureId, FeatureName = b.FeatureName, IsFeatureActive = b.IsFeatureActive, }).ToList(); return(query); } }
public List <PropertyListingAgentsView> GetAgents(Web.ViewModel.PropertyManagement.CaptureListing.NewListingView model, int PropertyId) { using (JazMax.DataAccess.JazMaxDBProdContext db = new DataAccess.JazMaxDBProdContext()) { var query = (from a in db.PropertyListingAgents join b in db.CoreAgents on a.AgentId equals b.CoreAgentId join c in db.CoreUsers on b.CoreUserId equals c.CoreUserId where a.PropertyListingId == PropertyId select new PropertyListingAgentsView { PropertyListingAgentsId = a.PropertyListingAgentsId, AgentId = a.AgentId, PropertyListingId = PropertyId, IsActive = a.IsActive, AgentName = c.FirstName + " " + c.LastName, Contact = c.CellPhone, Address = "Unknown", Email = c.EmailAddress, }).ToList(); return(query); } }