Пример #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 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); }
        }