Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Code for deletion from database at form level when deleting values from data gridview using check box column and a button for delete.

Code for deletion from database at form level when deleting values from data gridview using check box column and a button for delete.

Scheduled Pinned Locked Moved C#
databasecsharplinqcomgraphics
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Omar Akhtar Sheikh
    wrote on last edited by
    #1

    <pre> using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.Data.SqlClient; using System.Data.Sql; using Dotnet67.Sales.DAL; using Dotnet67.Sales.Items; using Dotnet67.Sales.Persons; using System.Data.SqlClient; namespace Dotnet67.Sales.DAL {       public class DALHelper       {                   private readonly string CONSTRING3 = "CASHIER1";                         public void InsertIntoCashier(string[] str,int[] val)             {                   SqlConnection con = new SqlConnection("server=.; Database=Dotnet67;uid=sa;pwd=123;");                   SqlCommand com = new SqlCommand(this.CONSTRING3, con);                   com.CommandType = CommandType.StoredProcedure;                                     com.Parameters.AddWithValue("@CashierID", val[0]);                   com.Parameters.AddWithValue("@CashierName", str[0]);                   con.Open();                   try                   {                   com.ExecuteNonQuery();                   }                   finally                   {                         con.Close();                   }             }    } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.T

    B 1 Reply Last reply
    0
    • O Omar Akhtar Sheikh

      <pre> using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.Data.SqlClient; using System.Data.Sql; using Dotnet67.Sales.DAL; using Dotnet67.Sales.Items; using Dotnet67.Sales.Persons; using System.Data.SqlClient; namespace Dotnet67.Sales.DAL {       public class DALHelper       {                   private readonly string CONSTRING3 = "CASHIER1";                         public void InsertIntoCashier(string[] str,int[] val)             {                   SqlConnection con = new SqlConnection("server=.; Database=Dotnet67;uid=sa;pwd=123;");                   SqlCommand com = new SqlCommand(this.CONSTRING3, con);                   com.CommandType = CommandType.StoredProcedure;                                     com.Parameters.AddWithValue("@CashierID", val[0]);                   com.Parameters.AddWithValue("@CashierName", str[0]);                   con.Open();                   try                   {                   com.ExecuteNonQuery();                   }                   finally                   {                         con.Close();                   }             }    } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.T

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      Check this google result.[^]


      I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.

      modified on Wednesday, July 22, 2009 2:58 PM

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups