コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }