예제 #1
0
        public EmployeeBadge(BadgeDataset.BadgeTableRow badge) : base(badge)
        {
            //Constructor
            try {
                if (badge != null)
                {
                    //base._idnumber = !badge.IsIDNumberNull() ? badge.IDNumber : 0;
                    //base._lastname = !badge.IsLastNameNull() ? badge.LastName : "";
                    //base._firstname = !badge.IsFirstNameNull() ? badge.FirstName : "";
                    //base._middle = !badge.IsMiddleNull() ? badge.Middle : "";
                    //base._suffix = !badge.IsSuffixNull() ? badge.Suffix : "";
                    //base._department = !badge.IsDepartmentNull() ? badge.Department : "";
                    //base._location = !badge.IsLocationNull() ? badge.Location : "";
                    //base._badgenumber = !badge.IsBadgeNumberNull() ? badge.BadgeNumber : 0;
                    //base._status = !badge.IsStatusNull() ? badge.Status : "";
                    //base._statusdate = !badge.IsStatusDateNull() ? badge.StatusDate : DateTime.MinValue;
                    //base._issuedate = !badge.IsIssueDateNull() ? badge.IssueDate : DateTime.MinValue;
                    //base._expirationdate = !badge.IsExpirationDateNull() ? badge.ExpirationDate : DateTime.MinValue;
                    //base._hiredate = !badge.IsHireDateNull() ? badge.HireDate : DateTime.MinValue;

                    this._organization = !badge.IsOrganizationNull() ? badge.Organization : "";
                    this._faccode      = !badge.IsFaccodeNull() ? badge.Faccode : 0;
                    this._sublocation  = !badge.IsSubLocationNull() ? badge.SubLocation : "";
                    this._employeeid   = !badge.IsEmployeeIDNull() ? badge.EmployeeID : "";
                    this._photo        = !badge.IsPhotoNull() ? badge.Photo : null;
                    this._signature    = !badge.IsSignatureNull() ? badge.Signature : null;
                    this._birthdate    = !badge.IsBirthDateNull() ? badge.BirthDate : DateTime.MinValue;
                    this._ssn          = !badge.IsSSNNull() ? badge.SSN : "";

                    base._hasphoto     = !badge.IsPhotoNull();
                    base._hassignature = !badge.IsSignatureNull();
                }
            }
            catch (Exception ex) { throw new ApplicationException(ex.Message, ex); }
        }
예제 #2
0
 public Badge(BadgeDataset.BadgeTableRow badge)
 {
     //Constructor
     try {
         if (badge != null)
         {
             this._idnumber       = !badge.IsIDNumberNull() ? badge.IDNumber : 0;
             this._lastname       = !badge.IsLastNameNull() ? badge.LastName : "";
             this._firstname      = !badge.IsFirstNameNull() ? badge.FirstName : "";
             this._middle         = !badge.IsMiddleNull() ? badge.Middle : "";
             this._suffix         = !badge.IsSuffixNull() ? badge.Suffix : "";
             this._department     = !badge.IsDepartmentNull() ? badge.Department : "";
             this._location       = !badge.IsLocationNull() ? badge.Location : "";
             this._badgenumber    = !badge.IsBadgeNumberNull() ? badge.BadgeNumber : 0;
             this._status         = !badge.IsStatusNull() ? badge.Status : "";
             this._statusdate     = !badge.IsStatusDateNull() ? badge.StatusDate : DateTime.MinValue;
             this._issuedate      = !badge.IsIssueDateNull() ? badge.IssueDate : DateTime.MinValue;
             this._expirationdate = !badge.IsExpirationDateNull() ? badge.ExpirationDate : DateTime.MinValue;
             this._hiredate       = !badge.IsHireDateNull() ? badge.HireDate : DateTime.MinValue;
             this._hasphoto       = !badge.IsPhotoNull();
             this._hassignature   = !badge.IsSignatureNull();
         }
     }
     catch (Exception ex) { throw new ApplicationException(ex.Message, ex); }
 }
예제 #3
0
        public DriverBadge(BadgeDataset.BadgeTableRow badge) : base(badge)
        {
            //Constructor
            try {
                if (badge != null)
                {
                    this._organization = !badge.IsOrganizationNull() ? badge.Organization : "";
                    this._faccode      = !badge.IsFaccodeNull() ? badge.Faccode : 0;
                    this._sublocation  = !badge.IsSubLocationNull() ? badge.SubLocation : "";
                    this._employeeid   = !badge.IsEmployeeIDNull() ? badge.EmployeeID : "";
                    this._photo        = !badge.IsPhotoNull() ? badge.Photo : null;
                    this._signature    = !badge.IsSignatureNull() ? badge.Signature : null;
                    this._birthdate    = !badge.IsBirthDateNull() ? badge.BirthDate : DateTime.MinValue;

                    base._hasphoto     = !badge.IsPhotoNull();
                    base._hassignature = !badge.IsSignatureNull();
                }
            }
            catch (Exception ex) { throw new ApplicationException(ex.Message, ex); }
        }
예제 #4
0
 public VendorBadge(BadgeDataset.BadgeTableRow badge) : base(badge)
 {
 }