Пример #1
0
        public List <ShortStorageInfo> GetStorageInfoByID(string _storageid)
        {
            ShortStorageInfo _ShortStorageInfo = new ShortStorageInfo();
            var command = new DatabaseCommand <object, List <ShortStorageInfo> >();

            this.ProxyCalling(GetListStorageIdProxy, command);
            return(command.ReturnValue.Where(s => s.StorageId.Contains(_storageid)).ToList());
        }
Пример #2
0
 public static StorageSelectItem ConvertStorageItem(ShortStorageInfo shortStorageInfo)
 {
     return(new StorageSelectItem()
     {
         StorageId = shortStorageInfo.StorageId,
         StorageName = string.Format("{0} ({1})", shortStorageInfo.StorageId, shortStorageInfo.NumberStorage),
         MaximumStorage = shortStorageInfo.NumberStorage
     });
 }
Пример #3
0
        public void AddStorageInfo(ShortStorageInfo storageInfo)
        {
            var command = new DatabaseCommand <ShortStorageInfo, object>()
            {
                CallingInfo = storageInfo
            };

            this.ProxyCalling(AddStorageInfoProxy, command);
        }
        public JsonResult Update(ShortStorageInfo storageInfo)
        {
            CommonModelResult result = new CommonModelResult();

            try
            {
                _storageService.UpdateStorageInfo(storageInfo);
            }
            catch (BusinessException exception)
            {
                _logger.DebugFormat("BusinessException: {0}-{1}", exception.ErrorCode, exception.Message);
                result.ErrorCode        = exception.ErrorCode;
                result.ErrorDescription = CommonUtils.GetErrorMessage(exception);
            }
            catch (Exception exception)
            {
                _logger.Error(string.Format("Iternal error {0}", exception));
                result.ErrorCode        = ErrorCode.InternalErrorException;
                result.ErrorDescription = CommonUtils.GetEnumDescription(ErrorCode.InternalErrorException);
            }

            return(Json(result));
        }
Пример #5
0
 private string ConvertShortStorageInfoToString(ShortStorageInfo info)
 {
     return(info.ToString());
 }