Ejemplo n.º 1
0
        private void LoadData()
        {
            ConsultInfoService service = new ConsultInfoService();

            dt = service.GetStudentConsult(lblStudentID.Text);
            ConsultGrid.DataSource = service.GetStudentConsult(lblStudentID.Text);
            service.Dispose();
            //dt = new DataTable();

            this.bindingSource1.DataSource = dt;
        }
Ejemplo n.º 2
0
        private void LoadConsultList()
        {
            ConsultGrid.AutoGenerateColumns = false;
            ConsultGrid.AllowUserToAddRows  = false;
            ConsultGrid.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
            ConsultGrid.RowHeadersWidth     = 15;
            ConsultGrid.ColumnHeadersHeight = 30;
            ConsultGrid.ColumnHeadersDefaultCellStyle.Font = new Font("Segoe UI", 11.5F);
            ConsultGrid.RowsDefaultCellStyle.Font          = new Font("Segoe UI", 9.5F);
            ConsultGrid.DefaultCellStyle.WrapMode          = DataGridViewTriState.True;
            ConsultGrid.AutoSizeRowsMode    = DataGridViewAutoSizeRowsMode.AllCells;
            ConsultGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;

            UtilityClass.AddNewColumnToDataGridView(ConsultGrid, "상담번호", "consult_id", false, 10);
            UtilityClass.AddNewColumnToDataGridView(ConsultGrid, "상담날짜", "consult_date", true, 100);
            UtilityClass.AddNewColumnToDataGridView(ConsultGrid, "상담내용", "consult_details", true, 150);
            UtilityClass.AddNewColumnToDataGridView(ConsultGrid, "조치사항", "others", true, 150);
            ConsultInfoService service = new ConsultInfoService();

            ConsultGrid.DataSource = service.GetStudentConsult(lblStudentID.Text);
            ConsultGrid.ClearSelection();
            service.Dispose();
        }