using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using ChuPiao.Common.Enums;

namespace ChuPiao.Common.Utils
{
    public class MachineStatusHashTable
    {
        public static Hashtable MachineStatusHashtable = new Hashtable();

        static MachineStatusHashTable()
        {
            EnumDescription[] dess = EnumDescription.GetFieldTexts(typeof(MachineStatusEnum));
            foreach (EnumDescription des in dess)
            {
                MachineStatusHashtable.Add(des.EnumValue, des.EnumDisplayText);
            }
        }

        public static string GetMachineStatusString(int status)
        {
            if (MachineStatusHashtable.Contains(status))
            {
                return MachineStatusHashtable[status].ToString();
            }
            else
            {
                return "";
            }
        }
    }
}
