public AreaAuthorization Clone()
        {
            AreaAuthorization copy = new AreaAuthorization();

            copy = this.CloneObjectByBinary();

            return(copy);
        }
        public static AreaAuthorization New()
        {
            var aa = new AreaAuthorization();

            aa.CreateTime = DateTime.Now;
            aa.ModifyTime = DateTime.Now;
            aa.RepeatDay  = RepeatDay.每天;
            aa.SetTime(8, 30, 17, 30);
            return(aa);
        }
 public AreaAuthorizationRecord(AreaAuthorization aa, CardRole role)
 {
     this.Name          = aa.Name;
     this.Description   = aa.Description;
     this.TimeType      = aa.TimeType;
     this.StartTime     = aa.StartTime;
     this.EndTime       = aa.EndTime;
     this.TimeSpan      = aa.TimeSpan;
     this.DelayTime     = aa.DelayTime;
     this.ErrorDistance = aa.ErrorDistance;
     this.RepeatDay     = aa.RepeatDay;
     this.AreaId        = aa.AreaId;
     //this.Area = aa.Area;
     this.AccessType = aa.AccessType;
     this.RangeType  = aa.RangeType;
     this.CreateTime = DateTime.Now;
     this.ModifyTime = DateTime.Now;
     if (role != null)
     {
         this.CardRoleId = role.Id;
     }
     this.AuthorizationId = aa.Id;
 }