Example #1
0
 public void AtribuirUsuarioPemissoes(EBoolean incluir, EBoolean atualizar, EBoolean excluir, EBoolean consultar)
 {
     this.Incluir   = incluir;
     this.Atualizar = atualizar;
     this.Excluir   = excluir;
     this.Consultar = consultar;
 }
Example #2
0
        public static ListItem GetListItem(EBoolean type, bool selected)
        {
            var item = new ListItem(GetText(type), GetValue(type));

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
Example #3
0
 public static bool Equals(EBoolean type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
Example #4
0
 private static string GetText(EBoolean type)
 {
     if (type == EBoolean.True)
     {
         return("是");
     }
     if (type == EBoolean.False)
     {
         return("否");
     }
     throw new Exception();
 }
Example #5
0
 private static string GetValue(EBoolean type)
 {
     if (type == EBoolean.True)
     {
         return("True");
     }
     if (type == EBoolean.False)
     {
         return("False");
     }
     throw new Exception();
 }
Example #6
0
 private static string GetText(EBoolean type)
 {
     if (type == EBoolean.True)
     {
         return("ÊÇ");
     }
     else if (type == EBoolean.False)
     {
         return("·ñ");
     }
     else
     {
         throw new Exception();
     }
 }
Example #7
0
 public static bool Equals(string typeStr, EBoolean type)
 {
     return(Equals(type, typeStr));
 }
Example #8
0
 public void Desativar() => this.Ativo = EBoolean.False;
Example #9
0
 public void Ativar() => this.Ativo = EBoolean.True;