public static String TraduzTipo(eTipo tipo) { switch (tipo) { case eTipo.Cancelamento: { return("Cancelamento"); } case eTipo.Inativacao: { return("Inativação"); } case eTipo.Reativacao: { return("Reativação"); } default: { return("Indefinido"); } } }
protected DialogResult ShowLookUp() { Tipo = eTipo.Lookup; Griglia.AbilitaPulsanteOK = true; return(ShowDialog()); }
public static IList <AgendaRelatorio> CarregarPorUsuario(Object usuarioId, eTipo tipo) { String qry = String.Concat("* from relatorio_agendamento where agenda_usuarioId=", usuarioId, " and agenda_tipo=", Convert.ToInt32(tipo)); return(LocatorHelper.Instance.ExecuteQuery <AgendaRelatorio>(qry, typeof(AgendaRelatorio))); }
public static IList <ContratoStatus> Carregar(eTipo tipo) { String qry = "* from contratoStatus "; if (tipo != eTipo.Indefinido) { qry += " where contratostatus_tipo=" + (int)tipo; } qry += " order by contratostatus_descricao"; return(LocatorHelper.Instance.ExecuteQuery <ContratoStatus>(qry, typeof(ContratoStatus))); }
public List <ELogin> Listar(eTipo pTipo) { List <ELogin> lRetorno = new List <ELogin>(); Gradual.Generico.Dados.AcessaDadosAntigo _AcessaDados = new Gradual.Generico.Dados.AcessaDadosAntigo(); _AcessaDados.ConnectionStringName = Gradual.Generico.Dados.ConexaoAntigo.ConnectionName; string sbSQL = ""; switch (pTipo) { case eTipo.Administrador: sbSQL = "SELECT ID_Login,senha,assinatura, Ativo, Email, Tipo, Nome from Login where tipo = 1 and ativo = 'S' "; break; case eTipo.Assessor: sbSQL = "SELECT login.ID_Login,senha,assinatura, Ativo, Email, Tipo, id_assessorsinacor as nome from Login,assessor where tipo = 2 and login.id_login = assessor.id_login and ativo = 'S' "; break; case eTipo.Atendimento: sbSQL = "SELECT ID_Login,senha,assinatura, Ativo, Email, Tipo, Nome from Login where tipo = 4 and ativo = 'S' "; break; case eTipo.Telemarketing: sbSQL = "SELECT ID_Login,senha,assinatura, Ativo, Email, Tipo, Nome from Login where tipo = 5 and ativo = 'S' "; break; case eTipo.Todos: break; default: break; } DbCommand _DbCommand = _AcessaDados.CreateCommand(CommandType.Text, sbSQL.ToString()); DataTable _table = _AcessaDados.ExecuteDbDataTable(_DbCommand); ELogin _el; foreach (DataRow item in _table.Rows) { _el = new ELogin(); _el.ID_Login = Conversao.ToInt(item["ID_Login"]).Value; _el.Ativo = Conversao.ToChar(item["Ativo"]).Value; _el.Email = Conversao.ToString(item["Email"]); _el.Nome = Conversao.ToString(item["Nome"]); _el.Tipo = Conversao.ToInt(item["Tipo"]).Value; _el.Senha = Conversao.ToString(item["Senha"]); _el.Assinatura = Conversao.ToString(item["Assinatura"]); lRetorno.Add(_el); } return(lRetorno); }
public static IList <AtendimentoTipo> CarregarTodos(eTipo tipo) { String cond = ""; if (tipo != eTipo.Indefinido) { cond = " where atendimentotipo_tipo=" + Convert.ToInt32(tipo); } String qry = "* from atendimentoTipo" + cond + " order by atendimentotipo_descricao"; return(LocatorHelper.Instance.ExecuteQuery <AtendimentoTipo>(qry, typeof(AtendimentoTipo))); }
public static IList <Perfil> CarregarTodos(eTipo tipo) { String query = ""; if (tipo != eTipo.Indefinido) { query = "* FROM perfil WHERE perfil_tipo=" + Convert.ToInt32(tipo) + " ORDER BY perfil_descricao"; } else { query = "* FROM perfil ORDER BY perfil_descricao"; } return(LocatorHelper.Instance.ExecuteQuery <Perfil>(query, typeof(Perfil))); }
public static IList <Parentesco> CarregarNaoUsadosPor(Object planoId, eTipo tipo) { String query = ""; if (tipo != eTipo.Indeterminado) { query = "* FROM parentesco WHERE parentesco_tipo=" + Convert.ToInt32(tipo) + " AND parentesco_id NOT IN (SELECT planoparentescoagregado_parentescoId FROM plano_parentesco_agregado WHERE planoparentescoagregado_planoId=" + planoId + ") ORDER BY parentesco_descricao"; } else { query = "* FROM parentesco WHERE parentesco_id NOT IN (SELECT planoparentescoagregado_parentescoId FROM plano_parentesco_agregado WHERE planoparentescoagregado_planoId=" + planoId + ") ORDER BY parentesco_descricao"; } return(LocatorHelper.Instance.ExecuteQuery <Parentesco>(query, typeof(Parentesco))); }
public static IList <Parentesco> CarregarTodos(eTipo tipo) { String query = ""; if (tipo != eTipo.Indeterminado) { query = "* FROM parentesco WHERE parentesco_tipo=" + Convert.ToInt32(tipo) + " ORDER BY parentesco_descricao"; } else { query = "* FROM parentesco ORDER BY parentesco_descricao"; } return(LocatorHelper.Instance.ExecuteQuery <Parentesco>(query, typeof(Parentesco))); }
public static IList <CategoriaContaCorrente> CarregarTodas(eTipo tipo) { String query = "* FROM contacorrenteCategoria WHERE cccategoria_tipo=" + Convert.ToInt32(tipo) + " ORDER BY cccategoria_tipo, cccategoria_descricao"; return(LocatorHelper.Instance.ExecuteQuery <CategoriaContaCorrente>(query, typeof(CategoriaContaCorrente))); }
public void Selecionar(eTipo x) { Tipo = x; Selecionado = true; }
public Cell() { this.Selecionado = false; Tipo = eTipo.Vazio; }
private void bOK_Click(object sender, EventArgs e) { Tipo = (rbSingolo.Checked ? eTipo.Singolo : eTipo.Serie); this.DialogResult = System.Windows.Forms.DialogResult.OK; }
/// <summary> /// Lista os endereços de um cliente /// </summary> /// <param name="_ID_Cliente">Id do Cliente</param> /// <param name="_Tipo">Tipo do endereço</param> /// <param name="Correspondencia">Endereço de correspondência?</param> /// <returns>Lista os endereços do cliente</returns> public BindingList <EEndereco> Listar(int _ID_Cliente, eTipo _Tipo, eCorrespondencia Correspondencia) { try { BindingList <EEndereco> _EEndereco = new BindingList <EEndereco>(); AcessaDadosAntigo _AcessaDados = new AcessaDadosAntigo(); _AcessaDados.ConnectionStringName = ConexaoAntigo.ConnectionName; StringBuilder sbSQL = new StringBuilder(); sbSQL.Append(" SELECT ID_Endereco "); sbSQL.Append(" ,ID_Cliente "); sbSQL.Append(" ,CEP "); sbSQL.Append(" ,Logradouro "); sbSQL.Append(" ,Numero "); sbSQL.Append(" ,Complemento "); sbSQL.Append(" ,Bairro "); sbSQL.Append(" ,Cidade "); sbSQL.Append(" ,UF "); sbSQL.Append(" ,Pais "); sbSQL.Append(" ,Correspondencia "); sbSQL.Append(" ,Tipo "); sbSQL.Append(" FROM Endereco "); sbSQL.Append(" where ID_CLiente = " + _ID_Cliente.ToString()); switch (_Tipo) { case eTipo.Todos: break; case eTipo.Comercial: sbSQL.Append(" and Tipo = 'C' "); break; case eTipo.Residencial: sbSQL.Append(" and Tipo = 'R' "); break; case eTipo.Outros: sbSQL.Append(" and Tipo = 'O' "); break; default: break; } switch (Correspondencia) { case eCorrespondencia.Todos: break; case eCorrespondencia.Sim: sbSQL.Append(" and Correspondencia = 'S' "); break; case eCorrespondencia.Nao: sbSQL.Append(" and Correspondencia = 'N' "); break; default: break; } DbCommand _DbCommand = _AcessaDados.CreateCommand(CommandType.Text, sbSQL.ToString()); DataTable _table = _AcessaDados.ExecuteDbDataTable(_DbCommand); foreach (DataRow item in _table.Rows) { EEndereco _End = new EEndereco(); _End.Bairro = Conversao.ToString(item["Bairro"]); _End.CEP = Conversao.ToString(item["CEP"]); _End.Cidade = Conversao.ToString(item["Cidade"]); _End.Complemento = Conversao.ToString(item["Complemento"]); _End.Correspondencia = Conversao.ToChar(item["Correspondencia"]).Value; _End.ID_Cliente = Conversao.ToInt(item["ID_Cliente"]).Value; _End.ID_Endereco = Conversao.ToInt(item["ID_Endereco"]).Value; _End.Logradouro = Conversao.ToString(item["Logradouro"]); _End.Numero = Conversao.ToString(item["Numero"]); _End.Pais = Conversao.ToString(item["Pais"]); _End.Tipo = Conversao.ToChar(item["Tipo"]).Value; _End.UF = Conversao.ToString(item["UF"]); _EEndereco.Add(_End); } if (_EEndereco.Count == 0) { throw new Exception("REGISTRONAOENCONTRADO"); } return(_EEndereco); } catch (Exception ex) { throw ex; } }
/// <summary> /// Seleciona uma quantidade de protocolos filtrados pelo tipo. /// </summary> /// <param name="pro_tipo">Tipo do protocolo.</param> /// <param name="qtdeProtocolo">Quantidade máxima de protocolos.</param> /// <returns></returns> public static List <DCL_Protocolo> SelecionaNaoProcessadosPorTipo(eTipo pro_tipo, int qtdeProtocolo) { return(new DCL_ProtocoloDAO().SelecionaNaoProcessadosPorTipo((byte)pro_tipo, qtdeProtocolo)); }
private void bOK_Click(object sender, EventArgs e) { Tipo = rbSingolo.Checked ? eTipo.Singolo : eTipo.Serie; DialogResult = DialogResult.OK; }