/// <summary> /// This function is used to delete an AttachmentList Entity. /// </summary> /// <param name="parentuid">The Parent Unique ID of the AttachmentList Entity.</param> /// <param name="childuid">The Child Unique ID of the AttachmentList Entity.</param> /// <param name="parentguid">The Parent GUID of the AttachmentList Entity.</param> /// <param name="childguid">The Child GUID of the AttachmentList Entity.</param> /// <returns>True on success, false on fail.</returns> public static bool Delete(System.Int32 parentuid, System.Int32 childuid, System.Guid parentguid, System.Guid childguid) { AttachmentListEntity attachment = new AttachmentListEntity(parentuid, parentguid, childuid, childguid); DataAccessAdapter ds = new DataAccessAdapter(); return(ds.DeleteEntity(attachment)); }
/// <summary> /// This function is used to insert a AttachmentList Entity in the storage area. /// </summary> /// <param name="parentuid">The Parent Unique ID of the AttachmentList Entity.</param> /// <param name="childuid">The Child Unique ID of the AttachmentList Entity.</param> /// <param name="parentguid">The Parent GUID of the AttachmentList Entity.</param> /// <param name="childguid">The Child GUID of the AttachmentList Entity.</param> /// <returns>True on success, False on fail.</returns> public static bool Insert(System.Int32 parentuid, System.Int32 childuid, System.Guid parentguid, System.Guid childguid) { AttachmentListEntity attachment = new AttachmentListEntity(); attachment.ChildUID = childuid; attachment.ParentUID = parentuid; attachment.ChildEntityTypeGUID = childguid; attachment.ParentEntityTypeGUID = parentguid; DataAccessAdapter ds = new DataAccessAdapter(); return(ds.SaveEntity(attachment)); }
/// <summary> /// This method is used to retreive a single AttachmentListEntity by it Primary Key /// </summary> /// <param name="parentUID">Parent Unique ID</param> /// <param name="parentEntityTypeGUID">Parent Entity Type Global Unique ID</param> /// <param name="childUID">Child Unique ID</param> /// <param name="childEntityTypeGUID">Child Entity Type Global Unique ID</param> /// <returns>An entity if found, null if nothing found.</returns> public static AttachmentListEntity SelectSingle(int parentUID, Guid parentEntityTypeGUID, int childUID, Guid childEntityTypeGUID) { AttachmentListEntity attachmentlist = new AttachmentListEntity(parentUID, parentEntityTypeGUID, childUID, childEntityTypeGUID); DataAccessAdapter ds = new DataAccessAdapter(); if (ds.FetchEntity(attachmentlist) == true) { return(attachmentlist); } else { return(null); } }