Ejemplo n.º 1
0
 public static string GetText(EVoteType type)
 {
     if (type == EVoteType.CheckBoxVote)
     {
         return("复选");
     }
     if (type == EVoteType.RadioVote)
     {
         return("单选");
     }
     throw new Exception();
 }
Ejemplo n.º 2
0
 public static string GetValue(EVoteType type)
 {
     if (type == EVoteType.RadioVote)
     {
         return("RadioVote");
     }
     if (type == EVoteType.CheckBoxVote)
     {
         return("CheckBoxVote");
     }
     throw new Exception();
 }
Ejemplo n.º 3
0
 public static bool Equals(EVoteType type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
Ejemplo n.º 4
0
 public static string GetText(EVoteType type)
 {
     if (type == EVoteType.CheckBoxVote)
     {
         return("��ѡ");
     }
     else if (type == EVoteType.RadioVote)
     {
         return("��ѡ");
     }
     else
     {
         throw new Exception();
     }
 }
Ejemplo n.º 5
0
        public static EVoteType GetEnumType(string typeStr)
        {
            EVoteType retval = EVoteType.RadioVote;

            if (Equals(EVoteType.CheckBoxVote, typeStr))
            {
                retval = EVoteType.CheckBoxVote;
            }
            else if (Equals(EVoteType.RadioVote, typeStr))
            {
                retval = EVoteType.RadioVote;
            }

            return(retval);
        }
Ejemplo n.º 6
0
 public static bool Equals(string typeStr, EVoteType type)
 {
     return(Equals(type, typeStr));
 }