Example #1
0
        public string Excluir(TRegistro_Turno val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(1);
            hs.Add("@P_ID_TURNO", val.Id_turno);

            return(this.executarProc("EXCLUI_PRD_TURNO", hs));
        }
Example #2
0
        public string Gravar(TRegistro_Turno val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(2);
            hs.Add("@P_ID_TURNO", val.Id_turno);
            hs.Add("@P_DS_TURNO", val.Ds_turno);

            return(this.executarProc("IA_PRD_TURNO", hs));
        }
Example #3
0
        public TList_Turno Select(Utils.TpBusca[] vBusca, Int32 vTop, string vNM_Campo)
        {
            TList_Turno lista         = new TList_Turno();
            bool        podeFecharBco = false;

            if (Banco_Dados == null)
            {
                podeFecharBco = this.CriarBanco_Dados(false);
            }
            System.Data.SqlClient.SqlDataReader reader = this.ExecutarBusca(this.SqlCodeBusca(vBusca, Convert.ToInt16(vTop), vNM_Campo));
            try
            {
                while (reader.Read())
                {
                    TRegistro_Turno reg = new TRegistro_Turno();
                    if (!reader.IsDBNull(reader.GetOrdinal("ID_Turno")))
                    {
                        reg.Id_turno = reader.GetDecimal(reader.GetOrdinal("ID_Turno"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("DS_Turno")))
                    {
                        reg.Ds_turno = reader.GetString(reader.GetOrdinal("DS_Turno"));
                    }

                    lista.Add(reg);
                }
            }
            finally
            {
                reader.Close();
                reader.Dispose();
                if (podeFecharBco)
                {
                    this.deletarBanco_Dados();
                }
            }
            return(lista);
        }