using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Globalization;
using Stimulsoft.Report.Dictionary;
using Stimulsoft.Report;
using DevComponents.DotNetBar;
using DevComponents.DotNetBar.Rendering;

namespace Library_Red_Diamonds
{
    public partial class borrowbookslist : Form
    {
        static SqlConnection con = new SqlConnection(Connection.con);
        public borrowbookslist()
        {
            InitializeComponent();
        }

        DataTable dt = new DataTable();
        DataBase db1 = new DataBase();

        private void borrowbookslist_Load(object sender, EventArgs e)
        {
            dt = db1.MySelect("select * from borrowbooks");
            dgv_book_borrow_list.DataSource = dt;
        }

        private void dgv_book_borrow_list_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (Application.OpenForms["backbook"] != null)
            {
                backbook backbook = (backbook)Application.OpenForms["backbook"];
                backbook.GetBookBorrowName(dgv_book_borrow_list.CurrentRow.Cells[1].Value.ToString(), dgv_book_borrow_list.CurrentRow.Cells[2].Value.ToString(), dgv_book_borrow_list.CurrentRow.Cells[3].Value.ToString(), dgv_book_borrow_list.CurrentRow.Cells[4].Value.ToString(), dgv_book_borrow_list.CurrentRow.Cells[5].Value.ToString(), dgv_book_borrow_list.CurrentRow.Cells[6].Value.ToString());
                this.Close();
            }
        }

    }
}
