protected override async Task OnInitializedAsync()
        {
            Saved = false;

            Guid.TryParse(CustomerId, out var customerId);

            if (customerId != Guid.Empty) //new Customer is being created
            {
                Customer = await CustomerDataService.GetCustomerDetails(customerId);
            }
        }
示例#2
0
        //public List<Country> Countries { get; set; } = new List<Country>();

        protected override async Task OnInitializedAsync()
        {
            Saved = false;
            //Countries = (await CountryDataService.GetAllCountries()).ToList();

            int.TryParse(CustomerId, out var CustomerID);

            if (CustomerID == 0) //new Customer is being created
            {
                //add some defaults
                Customer = new Customer {
                };
            }
            else
            {
                Customer = await CustomerDataService.GetCustomerDetails(int.Parse(CustomerId));
            }

            //CountryId = Customer.CountryId.ToString();
            //JobCategoryId = Customer.JobCategoryId.ToString();
        }
示例#3
0
 protected override async Task OnInitializedAsync()
 {
     Customer = await CustomerDataService.GetCustomerDetails(int.Parse(CustomerId));
 }
        public CustomerModel GetCustomerDetails(int customerId)
        {
            CustomerDataService oDataService = new CustomerDataService();

            return(oDataService.GetCustomerDetails(customerId));
        }
示例#5
0
 protected override async Task OnInitializedAsync()
 {
     Customer = await CustomerDataService.GetCustomerDetails(new System.Guid(CustomerId));
 }