Ejemplo n.º 1
0
        public static ListItem GetListItem(EVoteResultVisible type, bool selected)
        {
            var item = new ListItem(GetText(type), GetValue(type));

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
Ejemplo n.º 2
0
 public static bool Equals(EVoteResultVisible type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
Ejemplo n.º 3
0
 public static string GetText(EVoteResultVisible type)
 {
     if (type == EVoteResultVisible.Before)
     {
         return("ͶƱǰ�ɼ�");
     }
     else if (type == EVoteResultVisible.After)
     {
         return("ͶƱ��ɼ�");
     }
     else if (type == EVoteResultVisible.End)
     {
         return("ͶƱ�����ɼ�");
     }
     else
     {
         throw new Exception();
     }
 }
Ejemplo n.º 4
0
 public static string GetValue(EVoteResultVisible type)
 {
     if (type == EVoteResultVisible.Before)
     {
         return("Before");
     }
     else if (type == EVoteResultVisible.After)
     {
         return("After");
     }
     else if (type == EVoteResultVisible.End)
     {
         return("End");
     }
     else
     {
         throw new Exception();
     }
 }
Ejemplo n.º 5
0
 public static bool Equals(string typeStr, EVoteResultVisible type)
 {
     return(Equals(type, typeStr));
 }