public static void Ativar(string Tabela, string Id, string Status) { Geral.Pergunta("Deseja realmente alterar o status do registro?"); if (!Geral.Resposta) { return; } string sql = "update " + Tabela + " SET ativo = '" + Status + "' where " + Tabela + "_id = " + Id; ExecutarSQL(sql); }
public static void Excluir(string Tabela, string Id) { Geral.Pergunta("Deseja realmente exclur o registro?"); if (!Geral.Resposta) { return; } string sql = "delete from " + Tabela + " where " + Tabela + "_id = " + Id; ExecutarSQL(sql); }
public static void Ativar(string Tabela, string id, string status) { Geral.Pergunta("Deseja alterar o status desse registro?"); if (!Geral.Resposta) { return; } string sql = "update " + Tabela; sql += " SET ativo = '" + status; sql += "' where " + Tabela + "_id = " + id; ExecutarSQL(sql); }
public static bool Excluir(string Tabela, string id) { Geral.Pergunta("Deseja realmente excluir esse registro?"); if (!Geral.Resposta) { return(false); } string sql = "delete from " + Tabela; sql += " where " + Tabela + "_id = " + id; ExecutarSQL(sql); return(true); }