Ejemplo n.º 1
0
 public static int GetDBType(ECmsType type)
 {
     if (type == ECmsType.News)
     {
         return(1);
     }
     else if (type == ECmsType.Study)
     {
         return(2);
     }
     else if (type == ECmsType.Partake)
     {
         return(3);
     }
     else if (type == ECmsType.Branch)
     {
         return(4);
     }
     else
     {
         throw new Exception();
     }
 }
Ejemplo n.º 2
0
 public static string GetValue(ECmsType type)
 {
     if (type == ECmsType.News)
     {
         return("News");
     }
     else if (type == ECmsType.Study)
     {
         return("Study");
     }
     else if (type == ECmsType.Partake)
     {
         return("Partake");
     }
     else if (type == ECmsType.Branch)
     {
         return("Branch");
     }
     else
     {
         throw new Exception();
     }
 }
Ejemplo n.º 3
0
 public static string GetText(ECmsType type)
 {
     if (type == ECmsType.News)
     {
         return("新闻管理");
     }
     else if (type == ECmsType.Study)
     {
         return("我要学习");
     }
     else if (type == ECmsType.Partake)
     {
         return("我要参与");
     }
     else if (type == ECmsType.Branch)
     {
         return("支部管理");
     }
     else
     {
         throw new Exception();
     }
 }
Ejemplo n.º 4
0
 private ListItem GetListItem(ECmsType type)
 {
     return(new ListItem(ECmsTypeUtils.GetText(type), ECmsTypeUtils.GetDBType(type).ToString()));
 }