//Methods public string PrintInfo() { string msg = ""; msg += propertyNumber + ", " + propertySuburb + ", " + PropertyBedroomNum + ", " + PropertyRent.ToString("C") + ", " + propertyStatus + "\n"; return(msg); }
public void UpdatePropertyRent(PropertyRent p) { if (p == null) { throw new ArgumentNullException("property is null"); } _propertyRentRepository.Update(p); _eventPublisher.EntityUpdated(p); }
public void DeletePropertyRent(PropertyRent p) { if (p == null) { throw new ArgumentNullException("property is null"); } p.Deleted = true; UpdatePropertyRent(p); }
public PropertyRentModel SaveRentProperty(PropertyRentModel model) { try { var rent = new PropertyRent(); if (model.PropertyId > 0) { rent = _db.PropertyRents.FirstOrDefault(x => x.PropertyId == model.PropertyId); } rent.Locality = model.Locality; rent.PropertyTypeId = model.PropertyTypeId; rent.SecurityAmount = model.SecurityAmount; rent.MaintenanceCharges = model.MaintenanceCharges; rent.Address = model.Address; rent.ADType = model.ADType; rent.Area = model.Area; rent.AU = model.AU; rent.AvailableDate = model.AvailableDate; rent.AvailableStatus = model.AvailableStatus; rent.BathroomNum = model.BathroomNum; rent.BikeParking = model.BikeParking; rent.CarParking = model.CarParking; rent.CityId = model.CityId; rent.ExpectedPrice = model.ExpectedPrice; rent.FacingId = model.FacingId; rent.FloorNum = model.FloorNum; rent.FurnishedType = model.FurnishedType; rent.Lift = model.Lift; rent.Mobile = model.Mobile; rent.ProjectSociety = model.ProjectSociety; rent.PropertyName = model.PropertyName; rent.SecurityAmount = model.SecurityAmount; rent.TotalFloor = model.TotalFloor; rent.Water = model.Water; rent.ModifiedDate = DateTime.UtcNow; rent.UserId = model.UserId; rent.BedRooms = model.BedRooms; if (model.PropertyId == 0) { _db.PropertyRents.Add(rent); } _db.SaveChanges(); model.PropertyId = rent.PropertyId; return(model); } catch { throw; } }
public static PropertyRent ToEntity(this PropertyRentModel createmodel, PropertyRent destination) { return(createmodel.MapTo(destination)); }
public static PropertyRentApproveListModel ToListModel(this PropertyRent entity) { return(entity.MapTo <PropertyRent, PropertyRentApproveListModel>()); }