Esempio n. 1
0
        /// <summary>
        /// Create a new item
        /// </summary>
        /// <param name="sap">SAP connection</param>
        /// <param name="code">Item code</param>
        /// <param name="name">Item name</param>
        /// <returns>Retrieve new object key</returns>
        public string Create(SAPConnection sap, string code, string name)
        {
            IItems partner = sap.Company.GetBusinessObject(BoObjectTypes.oItems);

            partner.ItemCode = code;
            partner.ItemName = name;

            sap.CheckResponse(partner.Add());
            return(sap.Company.GetNewObjectKey());
        }
 private void CreateOrUpdateTask(GithubIssue issue, TaskItem outlookTaskItem, IItems items)
 {
     if (outlookTaskItem != null)
     {
         UpdateAdapter(issue, outlookTaskItem);
     }
     else
     {
         using (var newItem = ((TaskItem)items.Add(OlItemType.olTaskItem)).WithComCleanupProxy())
         {
             UpdateAdapter(issue, newItem);
         }
     }
 }
 private void CreateOrUpdateTask(GithubIssue issue, TaskItem outlookTaskItem, IItems items)
 {
     if (outlookTaskItem != null)
     {
         UpdateAdapter(issue, outlookTaskItem);
     }
     else using (var newItem = ((TaskItem)items.Add(OlItemType.olTaskItem)).WithComCleanupProxy())
     {
         UpdateAdapter(issue, newItem);
     }
 }