コード例 #1
0
        public async Task <IActionResult> Index(int id)
        {
            try
            {
                var model = new MaintenanceTypeManagementViewModel()
                {
                    RootUrl             = BaseRootUrl,
                    SelectedGarageId    = id,
                    MaintenanceTypeList = await _maintenanceTypeService.GetMaintenanceTypes(id)
                };

                return(View(model));
            }
            catch (Exception ex)
            {
                ex.ToExceptionless().Submit();
                return(BadRequest());
            }
        }
コード例 #2
0
        public async Task <IActionResult> GetMaintenanceTypeList(int id)
        {
            try
            {
                if (id == 0)
                {
                    throw new ApplicationException("MaintenanceTypeList - Id should ne be set to 0");
                }

                var model = new MaintenanceTypeManagementViewModel()
                {
                    MaintenanceTypeList = await _maintenanceTypeService.GetMaintenanceTypes(id)
                };
                return(PartialView("_maintenanceTypes", model));
            }
            catch (Exception ex)
            {
                ex.ToExceptionless().Submit();
                return(BadRequest());
            }
        }