예제 #1
0
 private static Dictionary <string, object> PublicationTypeToAttributes(IPublicationType publicationType)
 {
     return(new Dictionary <string, object>()
     {
         { "PublicationType_ID", publicationType.ID.ToString() },
         { "Name", publicationType.Name },
     });
 }
예제 #2
0
        public static void InsertPublicationType(IPublicationType publicationType)
        {
            CheckWorkBook();

            var attributes = PublicationTypeToAttributes(publicationType);

            var id = new KeyValuePair <string, object>("PublicationType_ID", attributes["PublicationType_ID"]);

            if (Excel.IO.ExcelIOAPIs.IsIDOfWorksheet(FilePath, worksheets[3], id))
            {
                var idColumn = new Dictionary <string, object>()
                {
                    { id.Key, id.Value }
                };
                RowUpdate.Update(FilePath, worksheets[3], idColumn, attributes);
                return;
            }

            RowInsert.Insert(FilePath, worksheets[3], attributes);
        }
예제 #3
0
 public void Set(IPublicationType publicationType)
 {
     ID   = publicationType.ID;
     Name = publicationType.Name;
 }