private void btn_addBinaryAttach_Click(object sender, EventArgs e) { string filename; byte[] attachmentbytes = IOFunctionality.GeneralizedLoadAttachment(out filename); if (attachmentbytes != null) { BinaryAttachmentV2 attachment = new BinaryAttachmentV2(); if (ShipmentIC.InsertCorrespondence.Content.Attachments == null) { ShipmentIC.InsertCorrespondence.Content.Attachments = new AttachmentsV2(); } if (ShipmentIC.InsertCorrespondence.Content.Attachments.BinaryAttachments == null) { ShipmentIC.InsertCorrespondence.Content.Attachments.BinaryAttachments = new BinaryAttachmentExternalBEV2List(); } ShipmentIC.InsertCorrespondence.Content.Attachments.BinaryAttachments.Add(new BinaryAttachmentV2() { Data = attachmentbytes, DestinationType = UserTypeRestriction.Default, Encrypted = false, ExtensionData = null, FileName = filename, FunctionType = AttachmentFunctionType.Unspecified, SendersReference = "RandomReference " + Guid.NewGuid(), Name = System.IO.Path.GetFileNameWithoutExtension(filename) }); SetViewedItem(ShipmentIC, "Shipment for InsertCorrespondence"); } }
public virtual void InvokeSave <T>(T saveObj) { try { IOFunctionality.GeneralizedSaveFile(saveObj); } catch (Exception ex) { SetViewedItem(ex, "Failed during save file."); } }
public virtual T InvokeLoad <T>() { try { return(IOFunctionality.GeneralizedLoadFile <T>()); } catch (Exception ex) { SetViewedItem(ex, "Failed during load file."); throw; } }
private void btn_LoadRequest_Click(object sender, EventArgs e) { shipment.BatchLoggingRequest = IOFunctionality.GeneralizedLoadFile <BatchLoggingRequestExternal>(); }
private void btn_SaveRequest_Click(object sender, EventArgs e) { IOFunctionality.GeneralizedSaveFile(shipment.BatchLoggingRequest); }
private void saveDataItembtn_Click(object sender, EventArgs e) { IOFunctionality.GeneralizedSaveFile(dataItemResult); }
private void btn_SaveResult_Click(object sender, EventArgs e) { IOFunctionality.GeneralizedSaveFile(result); }