C# Класс EXGovtDataPortalExcel2SQL.Form1

Показать файл Открыть проект

Открытые методы

Метод Описание
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