Exemple #1
0
        private static string addAE2StorageCell(DBStorage db, string message)
        {
            AE2StorageCell storageCell;

            try
            {
                storageCell = (AE2StorageCell)JsonConvert.DeserializeObject(message, typeof(AE2StorageCell));
            }
            catch (Exception) { return("ERR"); }
            if (storageCell == null || storageCell.idAlmacen <= 0 || storageCell.tier <= 0)
            {
                return("ERR");
            }

            return(db.addStorageCell(storageCell) ? "OK" : "ERR");
        }