예제 #1
0
        public string DeletarApontamentoCustoFixo(TRegistro_Apontamento_CustoFixo val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(2);
            hs.Add("@P_ID_APONTAMENTO", val.Id_apontamento);
            hs.Add("@P_ID_CUSTO", val.Id_custo);

            return(this.executarProc("EXCLUI_PRD_APONTAMENTO_CUSTOFIXO", hs));
        }
예제 #2
0
        public TList_Apontamento_CustoFixo Select(TpBusca[] vBusca, int vTop, string vNM_Campo)
        {
            TList_Apontamento_CustoFixo lista = new TList_Apontamento_CustoFixo();
            bool podeFecharBco = false;

            if (Banco_Dados == null)
            {
                this.CriarBanco_Dados(false);
                podeFecharBco = true;
            }
            SqlDataReader reader = this.ExecutarBusca(this.SqlCodeBusca(vBusca, Convert.ToInt16(vTop), vNM_Campo));

            try
            {
                while (reader.Read())
                {
                    TRegistro_Apontamento_CustoFixo reg = new TRegistro_Apontamento_CustoFixo();
                    if (!reader.IsDBNull(reader.GetOrdinal("ID_Apontamento")))
                    {
                        reg.Id_apontamento = reader.GetDecimal(reader.GetOrdinal("ID_Apontamento"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("ID_Custo")))
                    {
                        reg.Id_custo = reader.GetDecimal(reader.GetOrdinal("ID_Custo"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("DS_Custo")))
                    {
                        reg.Ds_custo = reader.GetString(reader.GetOrdinal("DS_Custo"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("TP_Custo")))
                    {
                        reg.Tp_custo = reader.GetString(reader.GetOrdinal("TP_Custo"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("Vl_Custo")))
                    {
                        reg.Vl_custo = reader.GetDecimal(reader.GetOrdinal("Vl_Custo"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("Indice_monetario")))
                    {
                        reg.Indice_monetario = reader.GetDecimal(reader.GetOrdinal("Indice_monetario"));
                    }

                    lista.Add(reg);
                }
            }
            finally
            {
                reader.Close();
                reader.Dispose();
                if (podeFecharBco)
                {
                    this.deletarBanco_Dados();
                }
            }
            return(lista);
        }
예제 #3
0
        public string GravarApontamentoCustoFixo(TRegistro_Apontamento_CustoFixo val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(4);
            hs.Add("@P_ID_APONTAMENTO", val.Id_apontamento);
            hs.Add("@P_ID_CUSTO", val.Id_custo);
            hs.Add("@P_VL_CUSTO", val.Vl_custo);
            hs.Add("@P_INDICE_MONETARIO", val.Indice_monetario);

            return(this.executarProc("IA_PRD_APONTAMENTO_CUSTOFIXO", hs));
        }