public async Task <IActionResult> Index(DateTime?planningDate)
    {
        return(await _resiliencyHelper.ExecuteResilient(async() =>
        {
            if (planningDate == null)
            {
                planningDate = DateTime.Now.Date;
            }

            var model = new WorkshopManagementViewModel
            {
                Date = planningDate.Value,
                MaintenanceJobs = new List <MaintenanceJob>()
            };

            // get planning
            string dateStr = planningDate.Value.ToString("yyyy-MM-dd");
            WorkshopPlanning planning = await _workshopManagementAPI.GetWorkshopPlanning(dateStr);
            if (planning?.Jobs?.Count > 0)
            {
                model.MaintenanceJobs.AddRange(planning.Jobs.OrderBy(j => j.StartTime));
            }

            return View(model);
        }, View("Offline", new WorkshopManagementOfflineViewModel())));
    }
示例#2
0
        public async Task <IActionResult> Index()
        {
            return(await _resiliencyHelper.ExecuteResilient(async() =>
            {
                var model = await _resumeManagementApi.GetResume();

                return View(model);
            }, View("Offline")));
        }
 public async Task <IActionResult> Index()
 {
     return(await _resiliencyHelper.ExecuteResilient(async() =>
     {
         var model = new CustomerManagementViewModel
         {
             Customers = await _customerManagementAPI.GetCustomers()
         };
         return View(model);
     }, View("Offline", new CustomerManagementOfflineViewModel())));
 }
示例#4
0
        public async Task <IActionResult> Index(int resumeId)
        {
            return(await _resiliencyHelper.ExecuteResilient(async() =>
            {
                var model = await _experienceWebApi.GetExperiences(resumeId);

                return View(model);
            }, View("Offline")));
        }
示例#5
0
        public async Task <IActionResult> Index(int resumeId)
        {
            ViewBag.ResumeId = resumeId;
            return(await _resiliencyHelper.ExecuteResilient(async() =>
            {
                var model = await _educationWebApi.GetEducations(resumeId);

                return View(model);
            }, View("Offline")));
        }
示例#6
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            int languageId = _workContext.Current.WorkingLanguageId;
            var res        = await _resiliencyHelper.ExecuteResilient(async() =>
            {
                var model = await _resumeManagementApi.GetResumeDetails(1, languageId);
                return(model);
            }, null);


            return(View(res));
        }