Example #1
0
        void BooksBind()
        {
            using (ControlerDB db = new ControlerDB())
            {
                DGV_Customize.DGV_Customize.DGV_Columns(dgvBooks, 0, "ID", "BookID", "Cod", false);
                DGV_Customize.DGV_Customize.DGV_Columns(dgvBooks, 1, "name", "BookName", "نام کتاب");
                DGV_Customize.DGV_Customize.DGV_Columns(dgvBooks, 2, "Writer", "Writer", "نویسنده");
                DGV_Customize.DGV_Customize.DGV_Columns(dgvBooks, 3, "Publishare", "Publishare", "انتشارات");
                DGV_Customize.DGV_Customize.DGV_Columns(dgvBooks, 4, "Code", "Code", "کد");

                dgvBooks.AutoGenerateColumns = false;
                dgvBooks.DataSource          = db.BookRepository.get();
                db.Dispose();
            }
        }
Example #2
0
 void UsersBind()
 {
     using (ControlerDB db = new ControlerDB())
     {
         DGV_Customize.DGV_Customize.DGV_Columns(dgvCustomers, 0, "ID", "CustomerID", "Code", false);
         DGV_Customize.DGV_Customize.DGV_Columns(dgvCustomers, 1, "FullName", "FullName", "نام");
         DGV_Customize.DGV_Customize.DGV_Columns(dgvCustomers, 2, "Phone", "Phone", "تلفن");
         DGV_Customize.DGV_Customize.DGV_Columns(dgvCustomers, 3, "Email", "Email", "ایمیل");
         DGV_Customize.DGV_Customize.DGV_Columns(dgvCustomers, 4, "Address", "Address", "آدرس");
         //Data Grid View Source And InforMation
         dgvCustomers.AutoGenerateColumns = false;
         dgvCustomers.DataSource          = db.CustomersRepository.GetAllCustomer();
         db.Dispose();
     }
 }