コード例 #1
0
        public ActionResult UpdateGraphic(OapGraphic model)
        {
            // TODO: Add update logic here
            var response = OapGraphicClient.UpdateGraphicAsync(model).Result;

            return(RedirectToAction("Index"));
        }
コード例 #2
0
        public async Task <ActionResult> CreateGraphic(OapGraphic model)
        {
            // TODO: Add insert logic here
            var response = await OapGraphicClient.AddGraphicAsync(model);

            return(RedirectToAction("Index"));
        }
コード例 #3
0
 public async Task <ActionResult> DeleteGraphic(OapGraphic model)
 {
     if (model.Id > 0)
     {
         var response = await OapGraphicClient.DeleteGraphicAsync(model.Id);
     }
     return(RedirectToAction("Index"));
 }
コード例 #4
0
        public WebApiResult <bool> UpdateGraphic([FromBody] OapGraphic list)
        {
            if (list == null)
            {
                throw new System.Exception("Argument is null");
            }

            return(TryCatch <UpdateGraphicRequest, bool>(new UpdateGraphicRequest(list)));
        }
コード例 #5
0
 public UpdateGraphicRequest(OapGraphic graphic)
 {
     Graphic = graphic;
 }
コード例 #6
0
 public WebApiResult <OapGraphic> AddGraphic([FromBody] OapGraphic list)
 {
     return(TryCatch <AddGraphicRequest, OapGraphic>(new AddGraphicRequest(list)));
 }