示例#1
0
        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
        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
        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);
        }