Exemplo n.º 1
0
        private string[] GetCsvColumns()
        {
            string[] retVal = null;


            if (_importService.Exists(InnerItem.TemplatePath))
            {
                if (!string.IsNullOrEmpty(InnerItem.TemplatePath))
                {
                    if (InnerItem.ColumnDelimiter == "?")
                    {
                        InnerItem.ColumnDelimiter = _importService.GetCsvColumnsAutomatically(InnerItem.TemplatePath);
                    }

                    retVal = _importService.GetCsvColumns(InnerItem.TemplatePath /*csv file name*/, InnerItem.ColumnDelimiter);
                }
            }
            else
            {
                IsError   = true;
                ErrorText = string.Format("File '{0}' doesn't exist".Localize(), InnerItem.TemplatePath);
            }
            return(retVal);
        }