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

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
Exemplo n.º 2
0
 public static bool Equals(EWriteBackMethod type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 3
0
 public static string GetText(EWriteBackMethod type)
 {
     if (type == EWriteBackMethod.None)
     {
         return("不回复信息");
     }
     if (type == EWriteBackMethod.ByWriteBackField)
     {
         return("直接回复信息");
     }
     if (type == EWriteBackMethod.ByEmail)
     {
         return("通过邮件回复信息");
     }
     if (type == EWriteBackMethod.All)
     {
         return("同时使用两种回复方式");
     }
     throw new Exception();
 }
Exemplo n.º 4
0
 public static string GetValue(EWriteBackMethod type)
 {
     if (type == EWriteBackMethod.None)
     {
         return("None");
     }
     if (type == EWriteBackMethod.ByWriteBackField)
     {
         return("ByWriteBackField");
     }
     if (type == EWriteBackMethod.ByEmail)
     {
         return("ByEmail");
     }
     if (type == EWriteBackMethod.All)
     {
         return("All");
     }
     throw new Exception();
 }
Exemplo n.º 5
0
 public static string GetText(EWriteBackMethod type)
 {
     if (type == EWriteBackMethod.None)
     {
         return("���ظ���Ϣ");
     }
     else if (type == EWriteBackMethod.ByWriteBackField)
     {
         return("ֱ�ӻظ���Ϣ");
     }
     else if (type == EWriteBackMethod.ByEmail)
     {
         return("ͨ���ʼ��ظ���Ϣ");
     }
     else if (type == EWriteBackMethod.All)
     {
         return("ͬʱʹ�����ֻظ���ʽ");
     }
     else
     {
         throw new Exception();
     }
 }
Exemplo n.º 6
0
        public static EWriteBackMethod GetEnumType(string typeStr)
        {
            EWriteBackMethod retval = EWriteBackMethod.None;

            if (Equals(EWriteBackMethod.None, typeStr))
            {
                retval = EWriteBackMethod.None;
            }
            else if (Equals(EWriteBackMethod.ByWriteBackField, typeStr))
            {
                retval = EWriteBackMethod.ByWriteBackField;
            }
            else if (Equals(EWriteBackMethod.ByEmail, typeStr))
            {
                retval = EWriteBackMethod.ByEmail;
            }
            else if (Equals(EWriteBackMethod.All, typeStr))
            {
                retval = EWriteBackMethod.All;
            }

            return(retval);
        }
Exemplo n.º 7
0
 public static bool Equals(string typeStr, EWriteBackMethod type)
 {
     return(Equals(type, typeStr));
 }