Ejemplo n.º 1
0
        public void loadDGVMem()
        {
            dgvMembers.RowTemplate.Height = 50;
            dgvMembers.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
            dgvMembers.AllowUserToAddRows = false;
            dgvMembers.EditMode           = DataGridViewEditMode.EditProgrammatically;

            MEMBERs   mem = new MEMBERs();
            DataTable dt  = new DataTable();

            dt = mem.getAllMEMBERS();
            dgvMembers.DataSource = dt;
            DataGridViewImageColumn pic = new DataGridViewImageColumn();

            pic             = (DataGridViewImageColumn)dgvMembers.Columns[3];
            pic.ImageLayout = DataGridViewImageCellLayout.Zoom;
            //foreach (DataGridViewRow row in dgvMembers.Rows)
            //{
            //    if (row.Cells["note"].Value.ToString() == "Chờ duyệt")
            //    {
            //        row.DefaultCellStyle.BackColor = Color.Khaki;
            //    }
            //    else
            //    {
            //        row.DefaultCellStyle.BackColor = Color.MediumSeaGreen;
            //    }
            //}
        }
Ejemplo n.º 2
0
        //Ham xu ly
        public void loadDGVMem() //Format lại cột BDate của Member (#FORMAT)
        {
            dgvMembers.RowTemplate.Height = 50;
            dgvMembers.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
            dgvMembers.AllowUserToAddRows = false;
            dgvMembers.EditMode           = DataGridViewEditMode.EditProgrammatically;
            MEMBERs   mem = new MEMBERs();
            DataTable dt  = new DataTable();

            dt = mem.getAllMEMBERS();
            dgvMembers.DataSource = dt;
            DataGridViewImageColumn pic = new DataGridViewImageColumn();

            pic             = (DataGridViewImageColumn)dgvMembers.Columns[3];
            pic.ImageLayout = DataGridViewImageCellLayout.Zoom;
        }