Posts

Showing posts from November, 2022

GraphQL React

Image
TopicSubArea.tsx  import { ApolloClient , gql , InMemoryCache , useQuery } from "@apollo/client" ; import { Delete , Edit } from "@mui/icons-material" ; import { Button , Dialog , DialogActions , DialogContent , DialogContentText , DialogTitle , FormControl , Grid , InputLabel , MenuItem , Select , TextField , Typography } from "@mui/material" ; import { AgGridReact } from "ag-grid-react" ; import React , { useEffect , useState } from "react" ; import apolloClient from "../../helpers/apolloclient.interceptor" ; import { useFormik } from "formik" ; const GET_TOPICSUBAREAS =     gql ` query {     topicSubArea         {             topicSubAreaId,             topicSubAreaName,             topicSubAreaDescription,             abbreviation         } } ` ; const GET_EVENTLIST =     gql `     query {         event {             eventId             eventName         }     }     ` ; const TopicSubAre

VB.Net

 Imports System.Data.SqlClient Imports System.Configuration Public Class Form1     Private Sub btnInsert_Click(sender As Object, e As EventArgs) Handles btnInsert.Click         Dim connectionString As String = ConfigurationManager.ConnectionStrings("MyConnectionString").ConnectionString         Dim name As String = txtName.Text ' Assuming you have a TextBox named txtName for the name input         Dim email As String = txtEmail.Text ' Assuming you have a TextBox named txtEmail for the email input         Using connection As New SqlConnection(connectionString)             connection.Open()             Dim insertQuery As String = "INSERT INTO YourTable (Name, Email) VALUES (@Name, @Email)" ' Replace with your table and column names             Using cmd As New SqlCommand(insertQuery, connection)                 cmd.Parameters.AddWithValue("@Name", name)                 cmd.Parameters.AddWithValue("@Email", email)                 Dim row