Пример #1
0
        public async Task <ActionResult> CreateGraphic(OapGraphic model)
        {
            // TODO: Add insert logic here
            var response = await OapGraphicClient.AddGraphicAsync(model);

            return(RedirectToAction("Index"));
        }
Пример #2
0
        public ActionResult UpdateGraphic(OapGraphic model)
        {
            // TODO: Add update logic here
            var response = OapGraphicClient.UpdateGraphicAsync(model).Result;

            return(RedirectToAction("Index"));
        }
 public OapChecklistGroupsController() : base()
 {
     OapChecklistGroupClient    = new OapChecklistGroupClient(GetApiBaseUrl(), Client);
     OapChecklistSubGroupClient = new OapChecklistSubGroupClient(GetApiBaseUrl(), Client);
     OapChecklistClient         = new OapChecklistClient(GetApiBaseUrl(), Client);
     OapGraphicClient           = new OapGraphicClient(GetApiBaseUrl(), Client);
 }
Пример #4
0
 public async Task <ActionResult> DeleteGraphic(OapGraphic model)
 {
     if (model.Id > 0)
     {
         var response = await OapGraphicClient.DeleteGraphicAsync(model.Id);
     }
     return(RedirectToAction("Index"));
 }
Пример #5
0
        public async Task <ActionResult> Graphics()
        {
            var response = await OapGraphicClient.GetAllAsync(GetAllModelsCorp());

            return(PartialView("OapGraphicPartial", response.Result.Data));
        }
Пример #6
0
        public async Task <ActionResult> Index()
        {
            var response = await OapGraphicClient.GetAllAsync(GetAllModelsCorp());

            return(View("OapGraphic", response.Result.Data));
        }
Пример #7
0
 public OapGraphicsController() : base()
 {
     OapGraphicClient = new OapGraphicClient(GetApiBaseUrl(), Client);
 }
 private ObservableCollection <OapGraphic> GetGraphics()
 {
     return(OapGraphicClient.GetAllAsync(GetAllModelsCorp()).Result?.Result?.Data);
 }