public static CustomerOrderItemVM SetSubData(CustomerOrderItem model)
        {
            var data = CustomerOrderItemVM.MToVM(model);

            data.DateTime  = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByOID(model.ID, model.API).FirstOrDefault());
            data.Item      = IS_ItemService.SetSubData(IS_ItemService.GetByID(model.ItemID), model.API);
            data.ItemColor = IS_ItemColorService.SetSubData(IS_ItemColorService.GetByID(model.ItemColorID));
            return(data);
        }
 public async Task <JsonResult> ICInsert()
 {
     try {
         var id    = Guid.Parse(Request.Form["id"]);
         var color = Request.Form["color"];
         var desc  = Request.Form["desc"];
         var oid   = Guid.Parse(Request.Form["oid"]);
         var aid   = Guid.Parse(Request.Form["aid"]);
         var cid   = Guid.Parse(Request.Form["cid"]);
         if (IS_ItemColorService.Insert(id, color, desc, oid, aid, cid))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedInsert("ItemColor")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }