예제 #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);
 }