private void barButtonItem2_ItemClick(object sender, ItemClickEventArgs e) { XtraQryProject frmProject = new XtraQryProject(); frmProject.UserInfo = UserInfo; //적용 처리를 한거라면 if (frmProject.ShowDialog() == DialogResult.OK) { CUtil.AutoMsg("프로젝트 불러오기", "성공", 2); XtraPLH frmPLH = new XtraPLH(); frmPLH.UserInfo = UserInfo; frmPLH.ProjectInfo = frmProject.ProjectInfo; frmPLH.IsMdiContainer = false; frmPLH.MdiParent = this; frmPLH.Show(); frmPLH.QryPLH(); } else { CUtil.AutoMsg("프로젝트 불러오기", "취소되었습니다.", 3); } }
private void simpleButton4_Click(object sender, EventArgs e) { DataTable plh_dt = (DataTable)gridControl1.DataSource; DataTable pld_dt = (DataTable)gridControl8.DataSource; COutSheet1 output = new COutSheet1(plh_dt, pld_dt, spreadControl); output.LoadData(); return; if (plh_dt == null || plh_dt.Rows.Count <= 0) { CUtil.AutoMsg("DATA 확인", "PLH 데이터가 없습니다.", 1); return; } if (pld_dt == null || pld_dt.Rows.Count <= 0) { CUtil.AutoMsg("DATA 확인", "PLD 데이터가 없습니다.", 1); return; } this.spreadControl.BeginUpdate(); Worksheet sheet = this.spreadControl.Document.Worksheets[0]; //Line1 head 출력 //컬럼 Row 추가 for (int i = 1; i <= 10; i++) { Cell cell = sheet.Rows[0][i]; SetCellStyle(cell, true, 9, Color.Aquamarine);//Cell Style 설정 switch (i) { case 1: cell.SetValue("Hscale"); break; case 2: cell.SetValue("Vscale"); break; case 3: cell.SetValue("CHAIN"); break; case 4: cell.SetValue("시작지반"); break; case 5: cell.SetValue("TYPE"); break; case 6: cell.SetValue("종단분할"); break; case 7: cell.SetValue("라인명"); break; case 8: cell.SetValue("관종"); break; case 9: cell.SetValue("맨홀INV"); break; case 10: cell.SetValue("유입라인"); break; } cell = sheet.Rows[1][i]; //SetCellStyle(cell, true, 9, Color.Aquamarine);//Cell Style 설정 switch (i) { case 1: cell.SetValue("500"); break; case 2: cell.SetValue("100"); break; case 3: cell.SetValue("20"); break; case 4: cell.SetValue("95"); break; case 5: cell.SetValue("A"); break; case 6: cell.SetValue("268"); break; case 7: cell.SetValue(""); break; case 8: cell.SetValue("PE 다중벽관"); break; case 9: cell.SetValue("0.2"); break; case 10: cell.SetValue("유입라인"); break; } } //Line1 head 출력 //컬럼 Row 추가 for (int i = 1; i <= 12; i++) { Cell cell = sheet.Rows[2][i]; SetCellStyle(cell, true, 9, Color.Aquamarine);//Cell Style 설정 switch (i) { case 1: cell.SetValue("누가거리"); break; case 2: cell.SetValue("지반고"); break; case 3: cell.SetValue("관저고"); break; case 4: cell.SetValue("관경"); break; case 5: cell.SetValue("맨홀"); break; case 6: cell.SetValue("TEXT1"); break; case 7: cell.SetValue("TEXT2"); break; case 8: cell.SetValue("구간"); break; case 9: cell.SetValue("구배"); break; case 10: cell.SetValue("INV"); break; case 11: cell.SetValue("SIZE"); break; case 12: cell.SetValue("라인명"); break; } } for (int i = 0; i <= 12; i++) { for (int j = 0; j < plh_dt.Rows.Count; j++) { Cell cell = sheet.Rows[3 + j][i]; //SetCellStyle(cell, true, 9, Color.Aquamarine);//Cell Style 설정 switch (i) { case 1: cell.SetValue(plh_dt.Rows[j]["dist2"]); //누가거리 break; case 2: cell.SetValue(plh_dt.Rows[j]["gh"]); //지반고 break; case 3: cell.SetValue(plh_dt.Rows[j]["inv"]); //관저고 break; case 4: cell.SetValue(plh_dt.Rows[j]["dia"]); //관경 break; case 5: if (plh_dt.Rows[j]["manhole_yn"].ToString() == "Y") { cell.SetValue(plh_dt.Rows[i]["linename"]); } break; case 6: cell.SetValue("TEXT1"); break; case 7: cell.SetValue("TEXT2"); break; case 8: cell.SetValue("구간"); break; case 9: cell.SetValue(plh_dt.Rows[j]["slope"]); //구배 break; case 10: cell.SetValue("inv"); break; case 11: cell.SetValue("SIZE"); break; case 12: cell.SetValue("라인명"); break; } } } this.spreadControl.EndUpdate(); }