Exemple #1
0
        public string NomeSetor(int IDSETOR, int IDEmpresa)
        {
            DataSetPontoFrequencia.TBInformacaoDiariaDataTable TBInformacaoDiaria = new DataSetPontoFrequencia.TBInformacaoDiariaDataTable();
            DataSetPontoFrequenciaTableAdapters.TBInformacaoDiariaTableAdapter adpInformacaoDiaria = new DataSetPontoFrequenciaTableAdapters.TBInformacaoDiariaTableAdapter();

            DataSetPontoFrequencia.TBSetorDataTable TBSetor = new DataSetPontoFrequencia.TBSetorDataTable();
            DataSetPontoFrequenciaTableAdapters.TBSetorTableAdapter adpSetor = new DataSetPontoFrequenciaTableAdapters.TBSetorTableAdapter();
            string msg = "";

            try
            {
                adpSetor.FillByIDSetor(TBSetor, IDSETOR, IDEmpresa);
            }
            catch (System.Data.OleDb.OleDbException ex)
            {
                msg = string.Format("Conexão com o banco de dados nula. Verifique o acesso a internet ou contate o administrador da rede");
                ex.ToString();
            }
            catch (Exception ex)
            {
                msg = "Setor Não Identificado";
                ex.ToString();
                return(msg);
            }

            if (!TBSetor[0].IsDSSetorNull())
            {
                return(TBSetor[0].DSSetor.ToString());
            }

            return("");
        }
Exemple #2
0
        public string InformacaoDiaria(int IDSETOR)
        {
            DataSetPontoFrequencia.TBInformacaoDiariaDataTable TBInformacaoDiaria = new DataSetPontoFrequencia.TBInformacaoDiariaDataTable();
            DataSetPontoFrequenciaTableAdapters.TBInformacaoDiariaTableAdapter adpInformacaoDiaria = new DataSetPontoFrequenciaTableAdapters.TBInformacaoDiariaTableAdapter();

            try
            {
                adpInformacaoDiaria.FillByTopInformacaoDiaria(TBInformacaoDiaria);
            }
            catch (Exception ex)
            {
                ex.ToString();
            }

            if (!TBInformacaoDiaria[0].IsDSInformacaoDiariaNull())
            {
                return(TBInformacaoDiaria[0].DSInformacaoDiaria.ToString());
            }
            else
            {
                return("");
            }
        }