BaseForm
Fields
Config
이전 버전의 "SessionInfo"
protected readonly IConfig Config
Property
WordDatas
폼ID로 등록된 다국어 코드와 캡션 정보
[DevTool6 → 용어 정보] 메뉴에서 "용어 적용/저장"을 통해 저장된 데이터
protected ReadOnlyDictionary<string, string> WordDatas { get; private set; }
AttachmentHelper, FtpAttachmentHelper
첨부 파일 헬퍼 클래스의 개체
protected internal AttachmentHelper AttachmentHelper { get; }
protected internal FtpAttachmentHelper FtpAttachmentHelper { get; }
RetrieveHelper
데이터 조회 관련 헬퍼 클래스 개체
참고) RetrieveHelper
protected RetrieveHelper RetrieveHelper { get; }
Method
ClickRetrieveButton
Browser의 '조회' 버튼 클릭시 호출되는 메서드로써, 재정의하여 사용
public override void ClickRetrieveButton()
{
// 조회 버튼 기능
}
ClickNewButton
Browser '신규' 버튼 클릭시 호출되는 메서드로써, 재정의하여 사용
public override void ClickNewButton()
{
// 신규 버튼 기능
}
ClickCopyButton
Browser의 '복사' 버튼 클릭시 호출되는 메서드로써, 재정의하여 사용
public override void ClickCopyButton()
{
// 복사 버튼 기능
}
ClickSaveButton
Browser의 '저장' 버튼 클릭시 호출되는 메서드로써, 재정의하여 사용
public override void ClickSaveButton()
{
// 저장 버튼 기능
}
ClickDeleteButton
Browser의 '삭제' 버튼 클릭시 호출되는 메서드로써, 재정의하여 사용
public override void ClickDeleteButton()
{
// 삭제 버튼 기능
}
ClickPreviewButton
Browser의 '미리보기' 버튼 클릭시 호출되는 메서드로써, 재정의하여 사용
public override void ClickPreviewButton()
{
// 미리보기 버튼 기능
}
ClickPrintButton
Browser의 '인쇄' 버튼 클릭시 호출되는 메서드로써, 재정의하여 사용
public override void ClickPreviewButton()
{
// 인쇄 버튼 기능
}
InitBaseButtons
액션 버튼 디자인 수정 코드 작성
protected override void InitBaseButtons()
{
// ...
}
GetServiceList
서비스 리스트 반환
로그인 한 사용자ID가 관리자, 개발자 권한일 때만 결과가 유효
protected DataTable GetServiceList();
UpdateProcessButtonState
액션 버튼들의 활성화 상태를 업데이트
MenuPermissions 속성에 처리 권한의 영향을 받음 (허용되지 않은 권한에 대해서는 버튼이 활성화 되지 않음)
처리 권한과 관계없이 상태를 변경하고자 할 경우에는 UpdateProcessButtonStateToHard 사용
참고)
ProcessButtonState
CurrentProcessButtonState
Parameters
ProcessButtonState processButtonState
: 적용할 버튼의 상태 ([Flags] 특성의 열거형)bool value
: 버튼 활성화 상태 값
매개변수 bool value
를 전달받는 메서드는 버튼의 상태를 하나씩 제어함
매개변수를 하나만 받는 메서드는 전달 받은 값으로 모든 버튼의 상태를 변경 (Example 2 참고)
public void UpdateProcessButtonState(ProcessButtonState processButtonState);
public void UpdateProcessButtonState(ProcessButtonState processButtonState, bool value);
UpdateProcessButtonStateToHard
처리 권한을 무시하고 Browser 버튼들의 활성화 상태를 업데이트
Parameters
ProcessButtonState processButtonState
: 적용할 버튼의 상태 ([Flags] 특성의 열거형)bool value
: 버튼 활성화 상태 값
public void UpdateProcessButtonStateToHard(ProcessButtonState processButtonState);
public void UpdateProcessButtonStateToHard(ProcessButtonState processButtonState, bool value);
CopyOfChangedData
이전 버전의 "BindingData"
DataSource 속성에 할당된 DataTable에서 변경된 DataRow.DataRowState들을 DataTable로 반환
반환되는 DataTable에는 "row_status"라는 DataColumn이 추가되고, DataRow의 변경 상태에 대하여 다음과 같이 처리된 값이 할당됨
DataRowState.Added
"N" (신규)
DataRowState.Modified
"U" (수정)
DataRowState.Deleted
"D" (삭제)
Parameters
object target
: GridControl, TreeList, DataTable 타입의 객체bool showMessage
: 변경된 DataRow가 없을때 "저장할 내용이 존재하지 않습니다." 메시지를 띄울지 여부 (Default = true)out int alertIndex
: GridColumnEx 또는 TreeListColumnEx 의 AllowBlank 속성의 값이 false인 행에 값이 없을 경우 RowHandle 또는 NodeId 의 값을 할당
Returns
DataTable
: 변경된 DataRow들의 DataTable
public DataTable CopyOfChangedData(object target, bool showMessage = false);
public DataTable CopyOfChangedData(object target, out int alertIndex, bool showMessage = false);
GetBizConfigurationValue
이전 버전의 "GetCustomInfoValue"
'sys_biz_configuration' 프로시저 결과의 데이터 반환
메인 앱이 처음 실행될때 한번만 호출하기 때문에 변경된 정보가 반영되려면 응용 프로그램을 새로 시작해야함
Parameters
string @class
: 분류 (ex. "Session")string code
: 코드
Returns
object : 값
public ReadOnlyDictionary<string, string> GetBizConfigurationValue(string @class);
public string GetBizConfigurationValue(string @class, string code);
GetLocalMachineName
이전 버전의 "GetClientPCName"
사용자 PC의 컴퓨터의 이름을 반환
Returns
string
: 컴퓨터 이름
public string GetLocalMachineName();
GetMacAddress
이전 버전의 "GetMacAddress"
사용자 PC의 MAC 주소를 반환
Returns
string
: MAC 주소
public string GetMacAddress();
GetLocalIpAddress
이전 버전의 "GetIPAddress"
사용자 PC의 내부 IP 주소를 반환
Returns
string
: IP 주소
public string GetLocalIpAddress()
GetPublicIpAddress
사용자 PC의 외부 IP 주소를 반환
외부 IP 정보를 반환하는 웹 사이트를 참조하는 방식
Returns
string
: 외부 IP 주소
public string GetPublicIpAddress();
ExecuteSql
쿼리 내용을 직접 입력하여 실행하고 그 결과를 반환
Parameters
string DBAlias
: 쿼리를 실행할 데이터베이스의 별칭string query
: 실행할 쿼리bool showMessageBoxWhenException
: 쿼리 실행시 발생한 에러 또는 사용자 정의 메시지 코드를 반환 받은 경우 자동으로 메시지를 띄울지 여부 (Default = false)
Returns
ResultSet
: 쿼리 실행 결과
public ResultSet ExecuteSql(string DBAlias, string query, bool showMessageBoxWhenException = false);
public ResultSet ExecuteSql(string query, bool showMessageBoxWhenException = false);
ExecuteProcedure
ProcedureInfo 클래스를 상속 받은 저장 프로시저 클래스의 개체를 참조하여 처리 후 결과를을 반환
Parameters
string DBAlias
: 쿼리를 실행할 데이터베이스의 별칭ProcedureInfo procedureInfo
: 저장 프로시저 클래스 개체bool showMessageBoxWhenException
: 쿼리 실행시 발생한 에러 또는 사용자 정의 메시지 코드를 반환 받은 경우 자동으로 메시지를 띄울지 여부 (Default = false)
Returns
ResultSet
: 쿼리 실행 결과
public ResultSet ExecuteProcedure(string DBAlias, ProcedureInfo procedureInfo, bool showMessageBoxWhenException = true);
public ResultSet ExecuteProcedure(ProcedureInfo procedureInfo, bool showMessageBoxWhenException = true);
ExecuteProcedures
하나 이상의 저장 프로시저를 묶어 한번의 트랜잭션에서 처리하며, 마지막에 처리된 결과만 반환
실행할 저장 프로시저의 정보는
ProcedureInfo[]
형식으로 전달받음Parameters
string DBAlias
: 쿼리를 실행할 데이터베이스의 별칭ProcedureInfo[] procedureInfos
: 저장 프로시저 클래스 개체bool showMessageBoxWhenException
: 쿼리 실행시 발생한 에러 또는 사용자 정의 메시지 코드를 반환 받은 경우 자동으로 메시지를 띄울지 여부 (Default = false)
Returns
ResultSet
: 쿼리 실행 결과
public ResultSet ExecuteProcedures(string DBAlias, ProcedureInfo[] procedureInfos, bool showMessageBoxWhenException = true);
public ResultSet ExecuteProcedures(ProcedureInfo[] procedureInfos, bool showMessageBoxWhenException = true);
ExecuteScalar
쿼리 내용을 직접 입력하여 실행하며 하나의 값의 반환
Parameters
string DBAlias
: 쿼리를 실행할 데이터베이스의 별칭string query
: 실행할 쿼리
Returns
object
: 쿼리 결과에서 첫번째 행의 첫번째 컬럼의 값
public object ExecuteScalar(string DBAlias, string query);
public object ExecuteScalar(string query);
ExecuteSqlDirectly
쿼리 내용을 직접 입력하여 실행하고 그 결과를 반환
ExecuteSql 과 다른 점은 데이터베이스의 'sys_execute_query' 프로시저를 통해 쿼리를 처리하는 것이 아니기 때문에 실행 결과에 대한 기타 정보(ResultSet.ResultRows, ResultSet.ReturnString )를 받아오지 못함
Parameters
string DBAlias
: 쿼리를 실행할 데이터베이스의 별칭string query
: 실행할 쿼리
Returns
ResultSet
: 쿼리 실행 결과
public ResultSet ExecuteSqlDirectly(string DBAlias, string query);
public ResultSet ExecuteSqlDirectly(string query);
GetServerDateTime
WAS(Web Application Server)의 일시(
DateTime
)를 반환Returns
DateTime
: 현재 일시
public DateTime GetServerDateTime();
AddNewRowToGrid
이전 버전의 "GridAddNewRow"
GridControl에 새로운 행 추가
Parameters
object grid
: GridControl 타입의 객체int index
: 행 추가 위치 (Default = FocusedRowHandle)
Returns
DataRow
: 새로 생성된 행
public DataRow AddNewRowToGrid(object grid);
public DataRow AddNewRowToGrid(object grid, int index);
DeleteRowInGrid
이전 버전의 "GridDeleteRow"
GridControl의 행(Row) 제거
Parameters
object grid
: GridControl 또는 GridView 타입의 객체DataRow[] dataRows
: 위 GridControl에 바인딩된 DataTable의 DataRowbool showAlertMessage
: 대상 행을 지우기 전에 알림 메시지 팝업 여부 (Default = false)
Returns
bool
: 성공 여부
public bool DeleteRowInGrid(object grid);
public bool DeleteRowInGrid(object grid, DataRow[] dataRows, bool showAlertMessage = false);
DeleteAllRowsInGrid
이전 버전의 "GridDeleteAllRow"
GridControl의 모든 행 제거
Parameters
object grid
: GridControl 또는 GridView 타입의 객체bool showAlertMessage
: 대상 행을 지우기 전에 알림 메시지 팝업 여부 (Default = false)
Returns
bool
: 성공 여부
public bool DeleteAllRowsInGrid(object grid, bool showAlertMessage = false);
InitControlsRecursive
이전 버전의 "InitControls"
public void InitControlsRecursive(Control control);
OpenFormByTab
public BaseForm OpenFormByTab(string formId, object param, bool isNewTab = false);
OpenFormByPopup
public DialogResult OpenFormByPopup(string formId, object param, out BaseForm baseForm);
SetReadOnlyRecursive
이전 버전의 "ReadOnlyControl"
public void SetReadOnlyRecursive(Control control, bool value, bool buttonsDisabled = true);
FillValuesFromDataSource
이전 버전의 "SetData"
public bool FillValuesFromDataSource(object targetControl, DataRow dataRow);
public bool FillValuesFromDataSource(object targetControl, DataTable dataTable);
FillValuesFromDictionary
이전 버전의 "SetData"
public bool FillValuesFromDictionary(object targetControl, System.Collections.IDictionary dictionary);
FillValuesFromReferenceControl
이전 버전의 "SetDataFromReferenceControl"
public bool FillValuesFromReferenceControl(object targetControl, object referenceControl);
GetDecimalPointFromCode
이전 버전의 "GetDecimalPointFromDecimalType"
public int GetDecimalPointFromCode(string decimalCode);
RefreshLookUpItems
이전 버전의 "SetLookUp"
protected void RefreshLookUpItems(RepositoryItemLookUpEditEx repositoryLookUp, bool initColumnDesign = false);
protected void RefreshLookUpItems(LookUpEditEx lookUpEdit, bool initColumnDesign = false);
protected void RefreshLookUpItems(IColumnItem columnItem, bool initColumnDesign = false);
ValidateControls
파라미터(
object control
)의 자식 컨트롤들 중 AllowBlank 속성 값이 false인 객체에 입력된 데이터가 없는 경우 "[XXX] 은(는) 필수입력항목입니다." 메시지 출력를 출력하고 false를 반환Parameters
object control
: PanelControl, GroupControl, XtraTabControl, XtraTabPage 타입의 객체
Returns
bool
: 검사 결과
public bool ValidateControls(object control);
ValidateDateTime
파라미터(
object dateTime
)가 날짜 타입인지 여부를 반환Parameters
object dateTime
: 날짜 형식의 객체 (DateTime 또는 string 타입)
Returns
bool
: 검사 결과
public bool ValidateDateTime(object dateTime);
FindControl
폼의 모든 자식 컨트롤을 대상으로 파라미터(
string controlName
)와 이름이 같은 컨트롤을 반환Parameters
string controlName
: 컨트롤 이름
Returns
object
: 찾은 컨트롤, 없으면null
protected object FindControl(string controlName);
SetGlobalValue
이전 버전의 "SetBrowserVariable"
메인 앱에 변수를 할당하여 프로그램이 종료되기 전까지 유지
Parameters
string @class
: 변수 분류string code
: 변수 코드object value
: 변수 값bool isOverWrite
: 덮어쓰기 여부 (Default = true)
protected void SetGlobalValue(string @class, string code, object value, bool isOverWrite = true);
GetGlobalValue
이전 버전의 "GetBrowserVariable"
메인 앱에 할당된 변수를 반환
Parameters
string class
: 변수 분류string code
: 변수 코드
Returns
object : 파라미터로 설정된 변수의 값
protected object GetGlobalValue(string @class, string code);
GetFormMessage
사용자 PC의 기본 문화권을 참조하여 해당 문화권 이름에 대한 폼에 설정된 메시지 내용을 반환
Parameters
string messageId
: 메시지 코드string alternativeMessage
: 코드가 존재하지 않을 경우 반환할 메시지 내용bool showMessageId
: 반환할 메시지 내용에 코드를 포함할 것인지 여부 (Default = false)
Returns
string
: 메시지 내용
protected string GetFormMessage(string messageId, string alternativeMessage, bool showMessageId = false);
GetFormWordInfo
파라미터(
string formId
)로 등록된 다국어 코드와 캡션 정보Parameters
string formId
: 다국어 목록을 가져올 폼IDstring cultureName
: 문화권 이름
Returns
DataTable
: 폼ID로 등록된 다국어 코드와 캡션 정보
protected DataTable GetFormWordInfo(string formId, string cultureName);
protected DataTable GetFormWordInfo(string formId);
ShowErrorMessageBox
에러 아이콘, OK 버튼만 가지는 디자인의 메시지 박스(팝업) 열기
Parameters
string message
: 메시지Exception ex
: 발생된 예외 객체
protected void ShowErrorMessageBox(string message);
protected void ShowErrorMessageBox(Exception ex);
ShowMessageBox
메시지 박스(팝업) 열기
Parameters
string msg
: 메시지string title
: 제목MessageFormButtons buttons
: 팝업에서 사용할 버튼 (Default = MessageFormButtons.OK)MessageFormIcon icon
: 팝업창의 아이콘 이미지 (Default = MessageFormIcon.Information)
Returns
DialogResult
: 팝업창의 반환 값
protected DialogResult ShowMessageBox(string msg, string title = "", MessageFormButtons buttons = MessageFormButtons.OK, MessageFormIcon icon = MessageFormIcon.Information);
GetWord
'WordDatas 속성' 에서 파라미터(
string wordId
)에 대한 다국어 캡션을 반환Parameters
string wordId
: 다국어 IDstring
alternativeCaption : 다국어 ID가 존재하지 않으면 반환할 캡션 값
Returns
string
: 다국어 캡션
protected string GetWord(string wordId, string alternativeCaption);
InitChildControlsRecursive
대상 컨트롤
control
로부터 모든 자식 컨트롤에 대한 초기화 처리 (재귀형)BaseForm.OnLoad 메서드에서 호출
Parameters
Control control
: Form, PanelControl, GroupControl 등의 객
protected void InitChildControlsRecursive(Control control);
GetDefault
Visual Studio 확장 도구 "DevTool6"의 [기본값 설정] 메뉴에서 설정한 사용자 지정 기본값 정보를 반환
Parameters
string processType
: 프로세스 타입string keyName
: 찾을 키 이름 (문자열)object nullValue
: 조건에 해당하는 등록된 값이 없을 경우 반환할 값 (Default = null)object control
: GridControl 또는 TreeList 타입의 객체string fieldName
: GridControl 또는 TreeList 타입의 객체에 설정된 Column의 FieldName
Returns
object
: 파라미터 조건에 해당하는 기본값 정보가 있으면 해당 값을 반환하고, 없으면object nullValue
로 지정한 값을 반환
public object GetDefault(string processType, string keyName, object nullValue = null);
public object GetDefault(string processType, object control, string fieldName, object nullValue = null);
UploadDataFromDataTable
아직 구현되지 않음
public bool UploadDataFromDataTable(DataTable data, string tableName, params string[] columnNames);
public bool UploadDataFromDataTable(DataTable data, string tableName, string[] columnNames, out string resultMessage);
public bool UploadDataFromDataTable(DataTable data, string tableName);
GetTempDirectory
현재 실행 중인 응용 프로그램과 같은 위치의 폴더에 "temp" 폴더를 생성하고 경로를 반환
폴더가 이미 존재할 경우엔 생성하지 않음
Returns
string : 임시 폴더 경로
public string GetTempDirectory();
ClearTempDirectory
임시 폴더 내 모든 파일을 삭제
public void ClearTempDirectory();
CreateSubForm
public T CreateSubForm<T>(params object[] args);
public object CreateSubForm(Type type, params object[] args);
Last updated