/// <summary> /// import from sheet PoskytovatelZdravotnichSluzeb /// </summary> /// <param name="excel_con"></param> private void ImportPoskytovatelZdravotnichSluzeb(OleDbConnection excel_con) { DataTable dtExcelData = new DataTable(); dtExcelData.Columns.AddRange(new DataColumn[3] { new DataColumn("Id", typeof(int)), new DataColumn("Nazev", typeof(string)), new DataColumn("TypPZS", typeof(string)) }); using (OleDbDataAdapter oda = new OleDbDataAdapter("SELECT * FROM [PoskytovatelZdravotnichSluzeb$]", excel_con)) { oda.Fill(dtExcelData); foreach (DataRow row in dtExcelData.Rows) { _dataConnector.CreatePoskytovatelZdravotnichSluzeb((string)row["Nazev"], (string)row["TypPZS"]); } } }