예제 #1
0
 public async Task <JsonResult> GetByID(string id, string api)
 {
     try {
         var data = LocationStorageService.GetByIDAPI(Guid.Parse(id), Guid.Parse(api));
         return(Success(LocationStorageVM.MToVM(data)));
     }catch { return(Failed(MessageUtility.ServerError())); }
 }
예제 #2
0
 public async Task <JsonResult> GetByIDAdmin()
 {
     try
     {
         var ownerID = Request.Form["oid"];
         //category
         var cat  = Request.Form["cat"];
         var data = LocationStorageService.GetByOwnerIDCat(ownerID, cat);
         return(Success(LocationStorageVM.MToVM(data)));
     }
     catch { return(Failed(MessageUtility.ServerError())); }
 }
        public static LocationStorageVM SetSubData(LocationStorage data, Guid aid)
        {
            var model = LocationStorageVM.MToVM(data);

            return(model);
        }
 public static StoreBranchVM SetSubData(StoreBranch data, Guid aid, Guid lcid)
 {
     var model = StoreBranchVM.MToVM(data);
     model.Geolocation = LocationStorageVM.MToVM(LocationStorageService.GetByIDOID(data.GeoLocationID, data.ID, lcid));
     return model;
 }