예제 #1
0
파일: MemberUC.cs 프로젝트: ysnna/repoGyms
        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;
            //    }
            //}
        }
예제 #2
0
 string getMemName()
 {
     string memName = null;
     MEMBERs mem = new MEMBERs();
     string memID = null;
     memID = dgvContracts.CurrentRow.Cells[1].Value.ToString();
     DataTable dt = new DataTable();
     dt = mem.getMemberbyID(memID);
     memName = dt.Rows[0][1].ToString() + " " + dt.Rows[0][2].ToString();
     return memName;
 }
예제 #3
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;
        }
예제 #4
0
        private void txtSearchMembers_KeyUp(object sender, KeyEventArgs e)
        {
            MEMBERs mem = new MEMBERs();

            dgvMembers.DataSource = mem.searchMember(txtSearchMembers.Text);
        }