public override DataSet Clone() { dtTKDGTre cln = ((dtTKDGTre)(base.Clone())); cln.InitVars(); return(cln); }
private void frmTKDGTre_Load(object sender, System.EventArgs e) { dtTKDGTre myDataSet = new dtTKDGTre(); string sql = "select * from docgia"; SqlConnection con = new SqlConnection(SqlHelper.ConnectString); SqlDataAdapter adapter = new SqlDataAdapter(sql, con); adapter.Fill(myDataSet, "docgia"); sql = "select * from muonsach where ngaymuon>='" + SqlHelper.dTuNgay + "' and ngaymuon<='" + SqlHelper.dDenNgay + "'"; con = new SqlConnection(SqlHelper.ConnectString); adapter = new SqlDataAdapter(sql, con); adapter.Fill(myDataSet, "muonsach"); sql = "select * from chitietphieumuon" + " inner join muonsach on chitietphieumuon.sophieumuon=muonsach.sophieumuon" + " where hantra<'" + DateTime.Now + "'"; con = new SqlConnection(SqlHelper.ConnectString); adapter = new SqlDataAdapter(sql, con); adapter.Fill(myDataSet, "chitietphieumuon"); rptTKDGTre1 = new rptTKDGTre(); rptTKDGTre1.SetDataSource(myDataSet); ReportViewer.ReportSource = rptTKDGTre1; }