Example #1
0
 public string Gravar(TRegistro_HoraBoliche val)
 {
     System.Collections.Hashtable hs = new System.Collections.Hashtable(4);
     hs.Add("@P_ID_HORA", val.Id_Hora);
     hs.Add("@P_HORA", val.Hora);
     hs.Add("@P_VL_HORA", val.Vl_hora);
     hs.Add("@P_DIA", val.Tp_dia);
     hs.Add("@P_TP_SERVICO", val.Tp_servico);
     return(this.executarProc("IA_RES_HORABOLICHE", hs));
 }
Example #2
0
        public TList_HoraBoliche Select(Utils.TpBusca[] vBusca, Int32 vTop, string vNM_Campo, string vOrder)
        {
            bool podeFecharBco      = false;
            TList_HoraBoliche lista = new TList_HoraBoliche();

            if (Banco_Dados == null)
            {
                podeFecharBco = this.CriarBanco_Dados(false);
            }
            System.Data.SqlClient.SqlDataReader reader = this.ExecutarBusca(this.SqlCodeBusca(vBusca, vTop, vNM_Campo, vOrder));
            try
            {
                while (reader.Read())
                {
                    TRegistro_HoraBoliche rHora = new TRegistro_HoraBoliche();
                    if (!reader.IsDBNull(reader.GetOrdinal("ID_Hora")))
                    {
                        rHora.Id_Hora = reader.GetDecimal(reader.GetOrdinal("ID_Hora"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("Hora")))
                    {
                        rHora.Hora = reader.GetTimeSpan(reader.GetOrdinal("Hora"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("Vl_Hora")))
                    {
                        rHora.Vl_hora = reader.GetDecimal(reader.GetOrdinal("Vl_Hora"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("Dia")))
                    {
                        rHora.Dia = reader.GetString(reader.GetOrdinal("Dia"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("Tp_servico")))
                    {
                        rHora.Tp_servico = reader.GetString(reader.GetOrdinal("Tp_servico"));
                    }
                    lista.Add(rHora);
                }
            }
            finally
            {
                reader.Close();
                reader.Dispose();
                if (podeFecharBco)
                {
                    this.deletarBanco_Dados();
                }
            }
            return(lista);
        }
Example #3
0
 public string Excluir(TRegistro_HoraBoliche val)
 {
     System.Collections.Hashtable hs = new System.Collections.Hashtable(1);
     hs.Add("@P_ID_HORA", val.Id_Hora);
     return(this.executarProc("EXCLUI_RES_HORABOLICHE", hs));
 }