public string Excluir(TRegistro_AliquotaSimples val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(2); hs.Add("@P_ID_TABELA", val.Id_tabela); hs.Add("@P_ID_ALIQUOTA", val.Id_aliquota); return(this.executarProc("EXCLUI_FIS_ALIQUOTASIMPLES", hs)); }
public string Gravar(TRegistro_AliquotaSimples val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(12); hs.Add("@P_ID_TABELA", val.Id_tabela); hs.Add("@P_ID_ALIQUOTA", val.Id_aliquota); hs.Add("@P_DS_ALIQUOTA", val.Ds_aliquota); hs.Add("@P_PC_ALIQUOTA", val.Pc_aliquota); hs.Add("@P_PC_IRPJ", val.Pc_irpj); hs.Add("@P_PC_CSLL", val.Pc_csll); hs.Add("@P_PC_COFINS", val.Pc_cofins); hs.Add("@P_PC_PIS", val.Pc_pis); hs.Add("@P_PC_CPP", val.Pc_cpp); hs.Add("@P_PC_ICMS", val.Pc_icms); hs.Add("@P_PC_IPI", val.Pc_ipi); hs.Add("@P_PC_ISS", val.Pc_iss); return(this.executarProc("IA_FIS_ALIQUOTASIMPLES", hs)); }
public TList_AliquotaSimples Select(Utils.TpBusca[] vBusca, Int32 vTop, string vNM_Campo) { TList_AliquotaSimples lista = new TList_AliquotaSimples(); 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_AliquotaSimples reg = new TRegistro_AliquotaSimples(); if (!reader.IsDBNull(reader.GetOrdinal("ID_Tabela"))) { reg.Id_tabela = reader.GetDecimal(reader.GetOrdinal("ID_Tabela")); } if (!reader.IsDBNull(reader.GetOrdinal("ID_Aliquota"))) { reg.Id_aliquota = reader.GetDecimal(reader.GetOrdinal("ID_Aliquota")); } if (!reader.IsDBNull(reader.GetOrdinal("DS_Aliquota"))) { reg.Ds_aliquota = reader.GetString(reader.GetOrdinal("DS_Aliquota")); } if (!reader.IsDBNull(reader.GetOrdinal("PC_Aliquota"))) { reg.Pc_aliquota = reader.GetDecimal(reader.GetOrdinal("PC_Aliquota")); } if (!reader.IsDBNull(reader.GetOrdinal("PC_IRPJ"))) { reg.Pc_irpj = reader.GetDecimal(reader.GetOrdinal("PC_IRPJ")); } if (!reader.IsDBNull(reader.GetOrdinal("PC_CSLL"))) { reg.Pc_csll = reader.GetDecimal(reader.GetOrdinal("PC_CSLL")); } if (!reader.IsDBNull(reader.GetOrdinal("PC_Cofins"))) { reg.Pc_cofins = reader.GetDecimal(reader.GetOrdinal("PC_Cofins")); } if (!reader.IsDBNull(reader.GetOrdinal("PC_PIS"))) { reg.Pc_pis = reader.GetDecimal(reader.GetOrdinal("PC_PIS")); } if (!reader.IsDBNull(reader.GetOrdinal("PC_CPP"))) { reg.Pc_cpp = reader.GetDecimal(reader.GetOrdinal("PC_CPP")); } if (!reader.IsDBNull(reader.GetOrdinal("PC_ICMS"))) { reg.Pc_icms = reader.GetDecimal(reader.GetOrdinal("PC_ICMS")); } if (!reader.IsDBNull(reader.GetOrdinal("PC_IPI"))) { reg.Pc_ipi = reader.GetDecimal(reader.GetOrdinal("PC_IPI")); } if (!reader.IsDBNull(reader.GetOrdinal("PC_ISS"))) { reg.Pc_iss = reader.GetDecimal(reader.GetOrdinal("PC_ISS")); } lista.Add(reg); } return(lista); } finally { reader.Close(); reader.Dispose(); if (podeFecharBco) { this.deletarBanco_Dados(); } } }