コード例 #1
0
ファイル: Form1.cs プロジェクト: amar751/KW_video_rental
        private void btnRDetails_Click(object sender, EventArgs e)
        {
            // get the details of the rental video details frm the database table
            DataTable tbl = new DataTable();

            Models.Connection obj = new Models.Connection();
            tbl = obj.srchRecord("select * from RentRecord");
            dgvDetails.DataSource = tbl;
            rentClk = 1;
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: amar751/KW_video_rental
        private void btnCDetails_Click(object sender, EventArgs e)
        {
            //get the record from the table and pass to the data grid view
            DataTable tbl = new DataTable();

            Models.Connection obj = new Models.Connection();
            tbl = obj.srchRecord("select * from CustomerRecord ");
            dgvDetails.DataSource = tbl;
            custClk = 1;
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: amar751/KW_video_rental
        private void btnVideoMost_Click(object sender, EventArgs e)
        {
            DataTable tblData = new DataTable();

            Models.Connection Instance_Record = new Models.Connection();
            tblData = Instance_Record.srchRecord("select * from VideoRecord ");
            int    x = 0, y = 0, c**t = 0;
            String Title = "";

            for (x = 0; x < tblData.Rows.Count; x++)
            {
                DataTable tblData1 = new DataTable();
                tblData1 = Instance_Record.srchRecord("select * from RentRecord where VId=" + Convert.ToInt32(tblData.Rows[x]["ID"].ToString()) + "");

                if (tblData1.Rows.Count > c**t)
                {
                    Title = tblData.Rows[x]["VName"].ToString();
                    c**t  = tblData1.Rows.Count;
                }
            }
            MessageBox.Show("Top Ratting Video  Title is ==" + Title);
        }