Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- public partial class Data_Header
- {
- public Data_Header()
- {
- this.Data_Lines = new HashSet<Data_Lines>();
- }
- public int DataHeaderID { get; set; }
- public System.Guid CmpWwn { get; set; }
- public System.Guid CntId { get; set; }
- public System.DateTime DeliveryDate { get; set; }
- public Nullable<int> DeliveryMethod_SysDeliveryMethodsID { get; set; }
- public System.DateTime DueDate { get; set; }
- public virtual Sys_DeliveryMethods Sys_DeliveryMethods { get; set; }
- public virtual vw_cicmpy vw_cicmpy { get; set; }
- public virtual ICollection<Data_Lines> Data_Lines { get; set; }
- }
- public class RequiredGuidAttribute : RequiredAttribute
- {
- public override bool IsValid(object value)
- {
- var guid = CastToGuidOrDefault(value);
- return !Equals(guid, default(Guid));
- }
- private static Guid CastToGuidOrDefault(object value)
- {
- try
- {
- return (Guid)value;
- }
- catch (Exception e)
- {
- if (e is InvalidCastException || e is NullReferenceException) return default(Guid);
- throw;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement