예제 #1
0
        public static void AtualizarRegistro(NotificacoesVO notificacoesVO)
        {
            string sql = "UPDATE notificacoes SET " +
                         $"descricao='{notificacoesVO.Descricao}', " +
                         $"chamar_tela='{notificacoesVO.Chamar_tela}', " +
                         $"visualizado={notificacoesVO.Visualizado} " +
                         "WHERE " +
                         $"id={notificacoesVO.Id}";

            DB.ExecutaSQL(sql);
        }
예제 #2
0
        public static void InserirRegistros(NotificacoesVO notificacoesVO)
        {
            string sql = "INSERT INTO notificacoes(" +
                         "id," +
                         "descricao," +
                         "chamar_tela," +
                         "visualizado) " +
                         "VALUES (" +
                         $"{notificacoesVO.Id}," +
                         $"'{notificacoesVO.Descricao}'," +
                         $"'{notificacoesVO.Chamar_tela}'," +
                         $"{notificacoesVO.Visualizado})";

            DB.ExecutaSQL(sql);
        }
예제 #3
0
        static NotificacoesVO MontaVO(DataRow row)
        {
            if (row != null)
            {
                NotificacoesVO notificacoesVO = new NotificacoesVO();
                notificacoesVO.Id          = Convert.ToInt32(row["id"]);
                notificacoesVO.Descricao   = row["descricao"].ToString();
                notificacoesVO.Chamar_tela = row["chamar_tela"].ToString();
                notificacoesVO.Visualizado = Convert.ToBoolean(row["visualizado"]);

                return(notificacoesVO);
            }
            else
            {
                return(null);
            }
        }