Example #1
0
 public async Task <JsonResult> DSGetByOwner(string id, string aid)
 {
     try {
         var data = DateTimeStorageService.GetByOID(Guid.Parse(id), Guid.Parse(aid));
         return(Success(DateTimeStorageVM.MsToVMs(data)));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
        //setting sub data sub classes of this class properties are set here
        public static UsersVM SetSubData(Users item, Guid aid)
        {
            var model = UsersVM.MToVM(item);

            model.DateTimeData = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByOID(item.DateTimeStorageID, aid).FirstOrDefault());
            model.ProfileImage = ImageLinkStorageVM.MToVM(ImageLinkStorageService.GetByIDAdmin(item.ProfileImageID));
            return(model);
        }
Example #3
0
        public static CustomerOrderVM SetSubData(CustomerOrder model)
        {
            var data = CustomerOrderVM.MToVM(model);

            data.DateTime  = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByOID(model.ID, model.API).FirstOrDefault());
            data.OrderItem = CustomerOrderItemService.SetSubDatas(CustomerOrderItemService.GetByCOID(model.ID, model.API));
            return(data);
        }
        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);
        }