private static Dictionary <string, object> PublicationTypeToAttributes(IPublicationType publicationType) { return(new Dictionary <string, object>() { { "PublicationType_ID", publicationType.ID.ToString() }, { "Name", publicationType.Name }, }); }
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); }
public void Set(IPublicationType publicationType) { ID = publicationType.ID; Name = publicationType.Name; }