Esempio n. 1
0
        public void Save()
        {
            ExportItem exportItem = Get.GetExportItem(ExportItemName);

            if (exportItem == null)
            {
                Insert.AddExportItem(ExportItemName, SelectStatementBuilder.LoadSelectStatementBuilder(exportItem.ExportItemName).SelectStatement(), ExportItemFtpId);
            }
            else
            {
                Update.UpdateExportItem(this);
            }
        }
 public CsvDataExporter(string pathAndFileName, ExportItem exportItem)
 {
     m_pathAndFileName        = pathAndFileName;
     m_selectClause           = exportItem.SelectStatementBuilder.SelectStatement();
     m_selectStatementBuilder = exportItem.SelectStatementBuilder;
 }
        //public void SaveSelectStatement()
        //{
        //    if (this.FTPFile)
        //        Insert.AddExportItem(this.Name, SerializeToXml(this), Convert.ToInt32(this.FTPSite));
        //    else
        //        Insert.AddExportItem(this.Name, SerializeToXml(this), 0);
        //}

        public static SelectStatementBuilder LoadSelectStatementBuilder(string name)
        {
            ExportItem exportItem = Data.Get.GetExportItem(name);

            return(DeserializeFromXml(exportItem));
        }