コード例 #1
0
ファイル: dtTKDGTre.cs プロジェクト: khanhnguyen18/tvqlLib
        public override DataSet Clone()
        {
            dtTKDGTre cln = ((dtTKDGTre)(base.Clone()));

            cln.InitVars();
            return(cln);
        }
コード例 #2
0
        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;
        }