예제 #1
0
        private void ImportCurrency(string fileName)
        {
            DataTable table = CsvToDataTable.ReadFile(fileName);

            int position = 1;

            foreach (DataRow row in table.Rows)
            {
                CodeSet codeSet = new CodeSet();

                codeSet.Code         = row["Code"].ToString();
                codeSet.EnumCode     = (int)row["EnumCode"].ToString().ParseInt();
                codeSet.Value        = row["Value"].ToString();
                codeSet.Description  = row["Description"].ToString();
                codeSet.ReferenceKey = string.Empty;
                codeSet.Position     = position;
                CoreDatabaseObjects.Instance.Save(codeSet);
                position++;
            }
        }
예제 #2
0
 public DataTable ReadData(string fileName)
 {
     return(CsvToDataTable.ReadFile(fileName));
 }