コード例 #1
0
        private static string deleteDrone(DBStorage db, string message)
        {
            short droneId;

            try
            {
                droneId = Int16.Parse(message);
            }
            catch (Exception) { return("ERR"); }
            if (droneId <= 0)
            {
                return("ERR");
            }

            return(db.deleteDrone(droneId) ? "OK" : "ERR");
        }