Exemplo n.º 1
0
        protected override async Task OnInitializedAsync()
        {
            House.LandlordId = 1;
            House.Address1   = "";
            Landlords        = await LandlordServices.GetLandlords();

            House.DateFrom = DateTime.Now;
            House.DateTo   = DateTime.Now.AddYears(1);
            // House.LandlordId = 0;
        }
Exemplo n.º 2
0
        protected override async Task OnInitializedAsync()
        {
            try

            {
                IsLoading        = true;
                ManagePagination = new ManagePagination <LandlordDto>();

                Landlords = await LandlordServices.GetLandlords();

                ManagePagination.DataSource   = Landlords;
                ManagePagination.SearchSource = Landlords;

                ManagePagination.PageCount = (int)Math.Ceiling((int)ManagePagination.SearchSource.Length / (decimal)ManagePagination.ItemPerPage);
                ManagePagination.Paginate(0);
                IsLoading = false;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                IsLoading = false;
                throw;
            }
        }
Exemplo n.º 3
0
        protected async Task HandleVilideSubmit()
        {
            await LandlordServices.SaveLandlord(Landlord);

            NavigationManager.NavigateTo("/landlordlist");
        }
Exemplo n.º 4
0
 protected override async Task OnInitializedAsync()
 {
     Landlord = await LandlordServices.GetLandlordById(Id);
 }
Exemplo n.º 5
0
        protected async Task HandleInvalidSubmit()
        {
            await LandlordServices.AddLandlord(Landlord);

            NavigationManager.NavigateTo("/landlordlist");
        }
Exemplo n.º 6
0
        protected async Task HandleVilidDelete()
        {
            await LandlordServices.DelateLandlord(Id);

            NavigationManager.NavigateTo("/landlordlist");
        }