public RealEstateListViewModel(IRealEstateService <T> service, IMessageService messageService,
                                       IDistrictService districtService, IRealtorService realtorService,
                                       IOwnershipService ownershipService, IDealVariantService dealVariantService,
                                       IConditionService conditionService,
                                       IExcelService excelService, IWordService wordService, IServiceLocator serviceLocator)
        {
            _RealEstateService  = service;
            _MessageService     = messageService;
            _DistrictService    = districtService;
            _RealtorService     = realtorService;
            _OwnershipService   = ownershipService;
            _DealVariantService = dealVariantService;
            _ConditionService   = conditionService;
            _ServiceLocator     = serviceLocator;
            _excelService       = excelService;
            _wordService        = wordService;

            AddCommand                  = new DelegateCommand(Add);
            ChangeCommand               = new DelegateCommand(Change);
            DeleteCommand               = new DelegateCommand(Delete);
            UpdateCommand               = new DelegateCommand(Update);
            ClearFilterCommand          = new DelegateCommand(ClearFilter);
            ApplyFilterCommand          = new DelegateCommand(ApplyFilter);
            ExportToExcelCommand        = new DelegateCommand(ExportToExcel);
            ExportToWordCommand         = new DelegateCommand(ExportToWord);
            ExportToWordSelectedCommand = new DelegateCommand(ExportToWordSelected);

            ChangeInGridCommand = new DelegateCommand <RealEstateViewModel <T> >(ChangeInGrid);
            DeleteInGridCommand = new DelegateCommand <RealEstateViewModel <T> >(DeleteInGrid);

            SelectedEntities = new List <RealEstateViewModel <T> >();
        }
        public RealEstateListingPresentationModel(IRealEstateListingView view, IRealEstateService realEstateService)
        {
            RealEstate realEstate = realEstateService.GetRealEstate();

            Address       = realEstate.Address;
            County        = realEstate.County;
            State         = realEstate.State;
            Price         = realEstate.Price;
            ZipCode       = realEstate.ZipCode;
            Bedrooms      = realEstate.Bedrooms;
            Bathrooms     = realEstate.Bathrooms;
            GarageSize    = realEstate.GarageSize;
            Acreage       = realEstate.Acreage;
            Description   = realEstate.Description;
            PropertyImage = realEstate.Image;

            this.Sections = new ObservableCollection <PieSection>();
            foreach (var matching in realEstate.CriteriaMatching)
            {
                this.Sections.Add(new PieSection()
                {
                    SectionWeight = matching.CriteriaWeight, MatchingPercentage = matching.CriteriaMatchingPercentage, Description = matching.FeatureDescription
                });
            }

            this.View = view;
            this.View.SetModel(this);
        }
        public RealEstateListingPresentationModel(IRealEstateListingView view, IRealEstateService realEstateService)
        {
            RealEstate realEstate = realEstateService.GetRealEstate();

            Address = realEstate.Address;
            County = realEstate.County;
            State = realEstate.State;
            Price = realEstate.Price;
            ZipCode = realEstate.ZipCode;
            Bedrooms = realEstate.Bedrooms;
            Bathrooms = realEstate.Bathrooms;
            GarageSize = realEstate.GarageSize;
            Acreage = realEstate.Acreage;
            Description = realEstate.Description;
            PropertyImage = realEstate.Image;

            this.Sections = new ObservableCollection<PieSection>();
            foreach(var matching in realEstate.CriteriaMatching)
            {
                this.Sections.Add(new PieSection() { SectionWeight = matching.CriteriaWeight, MatchingPercentage = matching.CriteriaMatchingPercentage, Description = matching.FeatureDescription });
            }
            
            this.View = view;
            this.View.SetModel(this);
        }
 public AccountController(ILogger <AccountController> logger,
                          IRealEstateService realEstateService,
                          IUserRepository userRepository)
 {
     _logger            = logger;
     _realEstateService = realEstateService;
     _userRepository    = userRepository;
 }
 public EstateContractsController(IEstateContractRepository estateContractRepository, IEstateRepository estateRepository, IRealEstateService realEstateService, IRequestEstateRepository requestEstateRepository, UserManager <ApplicationUser> userManager)
 {
     _estateContractRepository = estateContractRepository;
     _realEstateService        = realEstateService;
     _requestEstateRepository  = requestEstateRepository;
     _estateRepository         = estateRepository;
     _userManager = userManager;
 }
 public UserRepository(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IMapper mapper, RealEstateDbContext appDbContext, IRealEstateService realEstateService, IConfiguration configuration)//:base(RealEstateDbContext)
 {
     _userManager       = userManager;
     _signInManager     = signInManager;
     _mapper            = mapper;
     _appDbContext      = appDbContext;
     _realEstateService = realEstateService;
     _configuration     = configuration;
 }
Beispiel #7
0
 public AdminController(IAuthService authService, IHeatingService heatingService, IAdvertTypeService advertTypeService, IAdvertService advertService, IRealEstateService realEstateService, IAdminService adminService, IHttpContextAccessor httpContextAccessor)
 {
     _authService       = authService;
     _heatingService    = heatingService;
     _advertTypeService = advertTypeService;
     _advertService     = advertService;
     _realEstateService = realEstateService;
     _adminService      = adminService;
 }
Beispiel #8
0
 public RealEstateController(IRealEstateService realEstateService, IRealEstateClassService realEstateClassService,
                             IRealEstateStatusService realEstateStatusService, IRealEstateTypeService realEstateTypeService,
                             IRealEstateTypeWallService realEstateTypeWallService)
 {
     this.realEstateService         = realEstateService;
     this.realEstateClassService    = realEstateClassService;
     this.realEstateStatusService   = realEstateStatusService;
     this.realEstateTypeService     = realEstateTypeService;
     this.realEstateTypeWallService = realEstateTypeWallService;
 }
Beispiel #9
0
 public ContractService(IRepository <Contract, int> repository,
                        IServiceT <Contract, ContractDTO, int> service,
                        IUserService userService,
                        IEmployeeService employeeService,
                        IRealEstateService realEstateService,
                        IContractTypeService contractTypeService)
 {
     this.ContractTypeService = contractTypeService;
     this.repository          = repository;
     this.service             = service;
     this.UserService         = userService;
     this.EmployeeService     = employeeService;
     this.RealEstateService   = realEstateService;
 }
Beispiel #10
0
 public RealEstateController(IAuthService authService, IRealEstateService realEstateService, IDistrictService districtService, IPlaceService placeService, INeighborhoodService neighborhoodService, IAdvertTypeService advertTypeService, IHeatingService heatingService, IWebHostEnvironment hostEnvironment, IProvinceService provinceService, IAdvertService advertService, IPhotoService photoService)
 {
     _authService         = authService;
     _realEstateService   = realEstateService;
     _districtService     = districtService;
     _placeService        = placeService;
     _neighborhoodService = neighborhoodService;
     _advertTypeService   = advertTypeService;
     _heatingService      = heatingService;
     _hostEnvironment     = hostEnvironment;
     _provinceService     = provinceService;
     _advertService       = advertService;
     _photoService        = photoService;
 }
        public RealEstateEditViewModel(IRealEstateService <T> service, IMessageService messageService,
                                       IDistrictService districtService, IRealtorService realtorService,
                                       IOwnershipService ownershipService, IDealVariantService dealVariantService, IConditionService conditionService)
        {
            _RealEstateService  = service;
            _MessageService     = messageService;
            _DistrictService    = districtService;
            _RealtorService     = realtorService;
            _OwnershipService   = ownershipService;
            _DealVariantService = dealVariantService;
            _ConditionService   = conditionService;
            PropertyChanged    += (sender, args) =>
            {
                OkCommand.RaiseCanExecuteChanged();
            };

            OkCommand = new DelegateCommand(() =>
            {
                var mode  = _Id == 0 ? EditEndedMode.Add : EditEndedMode.Edit;
                var error = Error;
                if (error == null)
                {
                    UpdateModelFromValues();
                    SaveToDatabase();
                    CloseDialog();
                    OnEditEnded(mode, DbEntity);
                }
                else
                {
                    _MessageService.ShowMessage(error, "Ошибка", image: MessageBoxImage.Error);
                }
            }, CanOk);

            CancelCommand = new DelegateCommand(() =>
            {
                UpdateValuesFromModel();
                CloseDialog();
                OnEditEnded(EditEndedMode.Cancel, null);
            }, CanCancel);
        }
 public RealEstateController(IRealEstateService realEstateService)
 {
     _realEstateService = realEstateService;
 }
Beispiel #13
0
 public HomeController(IRealEstateService realEstateService, IPersonService personService, IDescriptionService descriptionService)
 {
     _realEstateService  = realEstateService;
     _personService      = personService;
     _descriptionService = descriptionService;
 }
 public ApartmentsController(IRealEstateService ctx)
 {
     service = ctx;
 }
 public RealEstateController(IRealEstateService realEstates)
 {
     this.realEstates = realEstates;
 }
Beispiel #16
0
 public RealEstatesController(IRealEstateService realEstates)
 {
     this.realEstates = realEstates;
 }
 public RealEstateComparatorController(IRealEstateService realEstateService, IMapper mapper)
 {
     _realEstateService = realEstateService;
     _mapper            = mapper;
 }
 public RealEstateController(IRealEstateService service)
 {
     m_service = service;
 }
Beispiel #19
0
 public RealEstateApiController(IRealEstateService service)
 {
     _service = service;
 }
Beispiel #20
0
 public AuthManager(IAdminService adminService, IRealEstateService realEstateService)
 {
     _adminService      = adminService;
     _realEstateService = realEstateService;
 }
 public AdminController(IRealEstateService realEstateService, IDescriptionService descriptionService)
 {
     sendForm            = new SendFormViewModel();
     _realEstateService  = realEstateService;
     _descriptionService = descriptionService;
 }