示例#1
0
 internal override bool Export(string targetFile, object targetObject)
 {
     try
     {
         SerializedFile.SaveXml(targetFile, targetObject);
         return(true);
     }
     catch (Exception ee)
     {
         ee.ThrowMyCustomizedException();
         return(false);
     }
 }
示例#2
0
        internal override bool Export(string targetFile, object targetObject)
        {
            try
            {
                //ExcelDocument doc = new ExcelDocument();
                //ExcelTable table = doc.AddTable("Table 1");


                //List<DBObject> myData = ((DocDbObject)targetObject).DbObjectList as List<DBObject>;

                //foreach (var item in myData)
                //{
                //    ExcelRow row = table.AddRow();
                //    row.AddCell(item.TableName);
                //    row.AddCell(item.ColumnName);
                //    row.AddCell(item.DbType);
                //    row.AddCell(item.Length);
                //    row.AddCell(item.Description);
                //    row.AddCell(item.Format);
                //    row.AddCell(item.OrdinaryPosition);
                //    row.AddCell(eDateType.DateTime,item.RevisionDate);
                //    row.AddCell(item.RevisionNote);
                //}

                //doc.Save(targetFile);

                SerializedFile.SaveXml(targetFile, targetObject);

                return(true);
            }
            catch (Exception ee)
            {
                ee.ThrowMyCustomizedException();
                return(false);
            }
        }