This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
// | |
using System.Runtime.InteropServices; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
using System.IO; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the files from Clipboard into Array of String. | |
string[] file_names = (string[])Clipboard.GetData(DataFormats.FileDrop); | |
// Paste data in the control. | |
lstFiles.DataSource = file_names; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Creating a list of File. | |
List<string> file_list = new List<string>(); | |
//Putting Files from any Directory to this List by foreach loop. | |
foreach (string file_name in Directory.GetFiles(Application.StartupPath)) | |
file_list.Add(file_name); | |
//Clear the already copied Data of clipboard. | |
Clipboard.Clear(); | |
//Copying File List to the Clip Board. | |
Clipboard.SetData(DataFormats.FileDrop, file_list.ToArray()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
//adding reference to library | |
using System.Drawing.Imaging; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create Database through Query : | |
Create DATABASE Customers_Database; | |
//Create a Table of Customer & its Attributes with Respective Data types & Primary Key through Query. | |
Create Table Customers | |
( | |
CustomerID int, | |
CustomerName char(200), | |
ContactName char(200), | |
Adress char (500), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string AQ = string.Format("Update CustomerDetail Set CustomerName='"+CustomerName+"', CustomerAddress='"+CustomerAddress+"' where CustomerID='"+CustomerID+"'"); | |
q.Conect(AQ, path); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CustomerID = Convert.ToInt32(CustomerIDTextBox2.Text); | |
dataGridView4.Show(); | |
SqlConnection con = new SqlConnection(path); | |
con.Open(); | |
SqlCommand com = new SqlCommand("Select * From InvoiceDetails where CustomerID = '" + CustomerID + "'", con); | |
SqlDataAdapter sda = new SqlDataAdapter(com); | |
DataTable dt = new DataTable(); | |
sda.Fill(dt); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Query q = new Query(); | |
string AQ = string.Format("Insert Into InvoiceDetails (CustomerID, InvoiceID, Date,ItemID,ItemName,ItemQuantity,ItemUnitPrice, ItemTotalAmount,TotalBill) Values ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}')", CustomerID, InvoiceID, Date, BookID, BookName, BookQuantity, BookUnitPrice, BookTotalPrice, TotalBillAmount); | |
q.Conect(AQ, path); |