C# 클래스 EXGovtDataPortalExcel2SQL.Form1

파일 보기 프로젝트 열기: EIS-Bonn/MA-INF3232-Lab-SS2014

공개 메소드들

메소드 설명
CreateLogFiles ( ) : string

create and set the Name of the log file.

ErrorLog ( string sPathName, string sErrMsg ) : int

Error Log

Form1 ( ) : System
GetOperatorID ( string OperatorName ) : int

it validate the database credential and get the operator ID. It makes an entry to Error log in case of any error.

OperatorID ( string operatorName ) : int
RemoveColumn ( string fname ) : DataTable
SaveParsedRecord ( string file ) : bool

It call the store procedue "s_AddBvDSubsidiary" and save the parsed record into the database. It make an entry into the Success log in case of success and also make an enty to error log in case of any error.

SuccessLog ( string SuccessFile ) : void

It create a success log in the specified directory and write the entries into success log accoringly if file is successfully imported into the database. It also move successfully moved Files to Archieve Directoy.

directorySelection ( ) : void

This function select the directory of Patent Excell files and shows the number of files. In case of any error it writes the error in the Error log and skip that file and if file is successfully imported then it make an entry to the successlog accordingly.

excelSaveinArray ( string filename ) : DataTable
parserResult ( string f ) : DataTable

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Clean up any resources being used.

비공개 메소드들

메소드 설명
CheckHeadersAndValidateData ( string f ) : int
Form1_Load ( object sender, EventArgs e ) : void

This is the starging point of the EXGovt.Dataportals Excel 2 sql parser!

Import_To_Grid ( string FilePath, string Extension, string isHDR ) : void
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

btnCheckConnection_Click ( object sender, EventArgs e ) : void
btnSaveRecord_Click ( object sender, EventArgs e ) : void

It save the parsed Record into the database

btnSelectDirectory_Click ( object sender, EventArgs e ) : void

It check the connection before browsing the directoy. if connection or its credential is ok then open file browser dialog to brows the directory of Patent files.

btnShowResult_Click ( object sender, EventArgs e ) : void

this is parse file button. That check the file before parsing it and then parse that files if there is no error in column and data validation of File. it also shows the parsed record into a gridview.

button1_Click ( object sender, EventArgs e ) : void
checkConnection ( ) : int

This function check the connection and validate credentials.It also call a function to get the operator id

groupBox1_Enter ( object sender, EventArgs e ) : void
rdbtnFile_CheckedChanged ( object sender, EventArgs e ) : void

메소드 상세

CreateLogFiles() 공개 메소드

create and set the Name of the log file.
public CreateLogFiles ( ) : string
리턴 string

Dispose() 보호된 메소드

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
리턴 void

ErrorLog() 공개 메소드

Error Log
public ErrorLog ( string sPathName, string sErrMsg ) : int
sPathName string
sErrMsg string
리턴 int

Form1() 공개 메소드

public Form1 ( ) : System
리턴 System

GetOperatorID() 공개 메소드

it validate the database credential and get the operator ID. It makes an entry to Error log in case of any error.
public GetOperatorID ( string OperatorName ) : int
OperatorName string
리턴 int

OperatorID() 공개 메소드

public OperatorID ( string operatorName ) : int
operatorName string
리턴 int

RemoveColumn() 공개 메소드

public RemoveColumn ( string fname ) : DataTable
fname string
리턴 System.Data.DataTable

SaveParsedRecord() 공개 메소드

It call the store procedue "s_AddBvDSubsidiary" and save the parsed record into the database. It make an entry into the Success log in case of success and also make an enty to error log in case of any error.
public SaveParsedRecord ( string file ) : bool
file string
리턴 bool

SuccessLog() 공개 메소드

It create a success log in the specified directory and write the entries into success log accoringly if file is successfully imported into the database. It also move successfully moved Files to Archieve Directoy.
public SuccessLog ( string SuccessFile ) : void
SuccessFile string
리턴 void

directorySelection() 공개 메소드

This function select the directory of Patent Excell files and shows the number of files. In case of any error it writes the error in the Error log and skip that file and if file is successfully imported then it make an entry to the successlog accordingly.
public directorySelection ( ) : void
리턴 void

excelSaveinArray() 공개 메소드

public excelSaveinArray ( string filename ) : DataTable
filename string
리턴 System.Data.DataTable

parserResult() 공개 메소드

public parserResult ( string f ) : DataTable
f string
리턴 System.Data.DataTable