Skip to content

Instantly share code, notes, and snippets.

View Gr8z's full-sized avatar

Mohammad Dohadwala Gr8z

View GitHub Profile
@Gr8z
Gr8z / vehicle.json
Last active June 7, 2023 09:15
CAFU Hackathon - Night City - Mock API
{
"id": 892,
"name": "Volvo V60",
"vehicle_model_id": 19,
"vehicle_model": {
"id": 19,
"make_id": 8,
"name": "Model S",
"body_type": "sedan",
"production_years": null,
@Gr8z
Gr8z / AddProduct.aspx.cs
Created January 18, 2020 20:05
Web Tech snippets
fuImage.SaveAs(Request.PhysicalApplicationPath +"./images/"+ fuImage.FileName.ToString());
b = "./images/" + fuImage.FileName.ToString();
SqlCommand cmd = new SqlCommand("INSERT INTO Fruits (FruitName, FruitPrice, FruitImage) VALUES (@FruitName, @FruitPrice, @FruitImagePath)", con);
cmd.Parameters.AddWithValue("@FruitName", txtFruitName.Text);
cmd.Parameters.AddWithValue("@FruitPrice", txtFruitPrice.Text);
cmd.Parameters.AddWithValue("@FruitImagePath", b.ToString());
cmd.ExecuteNonQuery();
gvFruits.DataBind();