Ejemplo n.º 1
0
        public async Task <IHttpActionResult> GetDashBoard()
        {
            RealEstateDashboardDto result = new RealEstateDashboardDto();

            result = _service.GetDashBoard();
            return(Ok(RealEstateResponse <RealEstateDashboardDto> .Create(result)));
        }
Ejemplo n.º 2
0
        public async Task <IHttpActionResult> GetDepartments()
        {
            DepartmentResultDto            result      = new DepartmentResultDto();
            List <RealEstateDepartmentDto> departments = _service.GetAllDepartments();

            result.DepartmentResults = departments;
            return(Ok(RealEstateResponse <DepartmentResultDto> .Create(result)));
        }
Ejemplo n.º 3
0
        public async Task <IHttpActionResult> GetAccounts()
        {
            AccountResultDto            result   = new AccountResultDto();
            List <RealEstateAccountDto> accounts = _service.GetAllAccounts();

            result.AccountResults = accounts;
            return(Ok(RealEstateResponse <AccountResultDto> .Create(result)));
        }
Ejemplo n.º 4
0
        public async Task <IHttpActionResult> GetLoginLogs(int page = 1, int pageSize = 10)
        {
            LoginLogResultDto            result  = new LoginLogResultDto();
            List <RealEstateLoginLogDto> Estates = _service.GetAllLoginLogs(page, pageSize);

            result.LoginLogResults = Estates;
            return(Ok(RealEstateResponse <LoginLogResultDto> .Create(result)));
        }
Ejemplo n.º 5
0
        public async Task <IHttpActionResult> GetTowns()
        {
            TownResultDto            result = new TownResultDto();
            List <RealEstateTownDto> items  = _service.GetAllTowns();

            result.TownResults = items;
            return(Ok(RealEstateResponse <TownResultDto> .Create(result)));
        }
Ejemplo n.º 6
0
        public async Task <IHttpActionResult> GetEstate_Types()
        {
            Estate_TypeResultDto            result = new Estate_TypeResultDto();
            List <RealEstateEstate_TypeDto> items  = _service.GetAllEstate_Types();

            result.Estate_TypeResults = items;
            return(Ok(RealEstateResponse <Estate_TypeResultDto> .Create(result)));
        }
Ejemplo n.º 7
0
        public async Task <IHttpActionResult> GetRentUnits()
        {
            RentUnitResultDto            result    = new RentUnitResultDto();
            List <RealEstateRentUnitDto> RentUnits = _service.GetAllRentUnits();

            result.RentUnitResults = RentUnits;
            return(Ok(RealEstateResponse <RentUnitResultDto> .Create(result)));
        }
Ejemplo n.º 8
0
        public async Task <IHttpActionResult> GetSaleUnits()
        {
            SaleUnitResultDto            result    = new SaleUnitResultDto();
            List <RealEstateSaleUnitDto> SaleUnits = _service.GetAllSaleUnits();

            result.SaleUnitResults = SaleUnits;
            return(Ok(RealEstateResponse <SaleUnitResultDto> .Create(result)));
        }
Ejemplo n.º 9
0
        public async Task <IHttpActionResult> UploadMedias()
        {
            var file = HttpContext.Current.Request.Files.Count > 0 ? HttpContext.Current.Request.Files[0] : null;

            var result = await _service.UploadFile(file);

            return(Ok(RealEstateResponse <long?> .Create(result)));
        }
Ejemplo n.º 10
0
        public async Task <IHttpActionResult> GetMasterData()
        {
            MasterDataDto result = new MasterDataDto {
                MasterData = new MasterDataResult()
            };

            result.MasterData.Towns        = _service.GetAllTowns();
            result.MasterData.ListingTypes = _service.GetAllEstate_Types();
            result.MasterData.SaleUnits    = _service.GetAllSaleUnits();
            result.MasterData.RentUnits    = _service.GetAllRentUnits();
            return(Ok(RealEstateResponse <MasterDataDto> .Create(result)));
        }
Ejemplo n.º 11
0
        public async Task <IHttpActionResult> ChangePassword(RealEstateAccountChangePasswordDto arguments)
        {
            bool update = _service.ChangePassword(arguments);

            return(Ok(RealEstateResponse <bool> .Create(update)));
        }
Ejemplo n.º 12
0
        public async Task <IHttpActionResult> UpdateAccount(RealEstateAccountDto arguments)
        {
            bool update = _service.UpdateAccount(arguments);

            return(Ok(RealEstateResponse <bool> .Create(update)));
        }
Ejemplo n.º 13
0
        public async Task <IHttpActionResult> CreateLoginLog(RealEstateLoginLogDto arguments)
        {
            bool update = _service.CreateLoginLog(arguments);

            return(Ok(RealEstateResponse <bool> .Create(update)));
        }
Ejemplo n.º 14
0
        public async Task <IHttpActionResult> GetMyEstates(ProductArguments productArguments)
        {
            var result = _service.GetAllMyEstates(productArguments);

            return(Ok(RealEstateResponse <EstateResultDto> .Create(result)));
        }