Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
load data
SUBMITTED BY:
openeyes
DATE:
April 23, 2016, 8:18 a.m.
FORMAT:
C#
SIZE:
736 Bytes
Raw
Download
Tweet
HITS:
51457
Go to comments
Report
private
void
load_data
()
{
SqlConnection
con
=
new
SqlConnection
(
dbclass
.
constring
);
try
{
string
query
=
"SELECT * from tbl_customer "
;
SqlCommand
cmd
=
new
SqlCommand
(
query
,
con
);
SqlDataAdapter
adp
=
new
SqlDataAdapter
(
cmd
);
DataTable
datatable
=
new
DataTable
();
adp
.
Fill
(
datatable
);
this
.
Grid1
.
DataSource
=
AutoNumberedTable
(
datatable
);
}
catch
(
Exception
ex
)
{
MessageBox
.
Show
(
ex
.
Message
);
}
finally
{
dbclass
.
con
.
Close
();
}
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus