 40946fb746
			
		
	
	40946fb746
	
	
	
		
			
			파트리스트 열 순서를 기존 사용 엑셀과 동일하게 정렬 파트리스트 적용부위 납기일 항목 추가 파트리스트 가져오기 메뉴에 적용부위, 납기일 항목 추가 파트리스트 내보내기 기능 - 파일명을 프로젝트 명으로 자동 입력
		
			
				
	
	
		
			43 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.Linq;
 | |
| using System.Text;
 | |
| using System.Threading.Tasks;
 | |
| 
 | |
| namespace FPJ0000
 | |
| {
 | |
|     public static class FPUtil
 | |
|     {
 | |
|         public static void ColsizeSave(FarPoint.Win.Spread.FpSpread dv, string fn)
 | |
|         {
 | |
|             arUtil.INIHelper ini = new arUtil.INIHelper(fn);
 | |
|             foreach (FarPoint.Win.Spread.Column col in dv.ActiveSheet.Columns)
 | |
|             {
 | |
|                 //열 필드명을 보고 저장하거나 번호로 저장한다
 | |
|                 var keyName = "index_" + col.Index.ToString();
 | |
|                 if (col.DataField != "") keyName = col.DataField;
 | |
|                 ini.set_Data("colsize", keyName, col.Width.ToString());
 | |
|             }
 | |
|                 
 | |
|             ini.Flush();
 | |
|         }
 | |
|         public static void ColSizeLoad(ref FarPoint.Win.Spread.FpSpread dv, string fn)
 | |
|         {
 | |
|             if (System.IO.File.Exists(fn) == false) return;
 | |
|             arUtil.INIHelper ini = new arUtil.INIHelper(fn);
 | |
|             foreach (FarPoint.Win.Spread.Column col in dv.ActiveSheet.Columns)
 | |
|             {
 | |
|                 //필드로 저장된게 있다면 그것을 쓰고 아니라면 번호를 쓴다
 | |
|                 var strWidth = "100";
 | |
|                 if(col.DataField != "")
 | |
|                 {
 | |
|                     strWidth = ini.get_Data("colsize", col.DataField, "");  //필드명으로 읽어서 자료가 없다면 인덱스로 한다
 | |
|                     if (strWidth == "") strWidth = ini.get_Data("colsize", "index_" + col.Index.ToString(), "0");
 | |
|                 }
 | |
|                 else strWidth = ini.get_Data("colsize", "index_" + col.Index.ToString(), "0");
 | |
|                 col.Width = float.Parse(strWidth);
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| }
 |