Exemple #1
0
        private void NoticeSearch()
        {
            dgvSearchResult.RowHeadersVisible = false;
            DataGridViewCheckBoxColumn chkboxCol = new DataGridViewCheckBoxColumn();

            chkboxCol.Width = 30;
            chkboxCol.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            dgvSearchResult.Columns.Insert(0, chkboxCol);
            CommonClass.AddNewColumnToDataGridView(dgvSearchResult, "번호", "Seq", false, 200);
            CommonClass.AddNewColumnToDataGridView(dgvSearchResult, "공지 날짜", "Notice_Date", true, 150);
            CommonClass.AddNewColumnToDataGridView(dgvSearchResult, "제목", "Title", true, 500);
            CommonClass.AddNewColumnToDataGridView(dgvSearchResult, "공지 내용", "Description", true, 1500);
            NoticeService noticeService = new NoticeService();

            dgvSearchResult.DataSource = noticeService.GetAllNotice();
        }
Exemple #2
0
        private void GridViewSettings()
        {
            CommonClass.AddNewColumnToDataGridView(dgvPlanInfo, "아이디", "User_ID", false, 200);
            CommonClass.AddNewColumnToDataGridView(dgvPlanInfo, "번호", "Seq", false, 200);
            CommonClass.AddNewColumnToDataGridView(dgvPlanInfo, "계획 날짜", "Plan_Date", true, 150);
            CommonClass.AddNewColumnToDataGridView(dgvPlanInfo, "제목", "Title", true, 300);
            CommonClass.AddNewColumnToDataGridView(dgvPlanInfo, "내용", "Notice", true, 450);
            List <UserPlanVo> bindList = (from item in userPlanList
                                          where (Convert.ToDateTime(item.Plan_Date).Month == DateTime.Now.Month) && (Convert.ToDateTime(item.Plan_Date).Year == DateTime.Now.Year)
                                          select item).ToList();

            dgvPlanInfo.DataSource = bindList;

            CommonClass.AddNewColumnToDataGridView(dgvNotice, "번호", "Seq", false, 200);
            CommonClass.AddNewColumnToDataGridView(dgvNotice, "공지 날짜", "Notice_Date", true, 150);
            CommonClass.AddNewColumnToDataGridView(dgvNotice, "제목", "Title", true, 500);
            CommonClass.AddNewColumnToDataGridView(dgvNotice, "공지 내용", "Description", true, 1500);
            NoticeService noticeService = new NoticeService();

            dgvNotice.DataSource = noticeService.GetAllNotice();
        }