Exemple #1
0
        internal override bool Populate(System.Data.SqlClient.SqlDataReader dr)
        {
            bool r = false;

            if (dr != null && AppShared.IsNotNull(dr[Columns.Id]))
            {
                this.mId             = AppShared.DbValueToInteger(dr[Columns.Id]);
                this.mObjectGuid     = AppShared.DbValueToGuid(dr[Columns.Guid]);
                this.mCaption        = AppShared.DbValueToString(dr[Columns.Caption]);
                this.mGroupName      = AppShared.DbValueToString(dr[Columns.GroupName]);
                this.mIconLarge      = AppShared.DbValueToBytes(dr, Columns.IconLarge);
                this.mIconSmall      = AppShared.DbValueToBytes(dr, Columns.IconSmall);
                this.mListCaption    = AppShared.DbValueToString(dr[Columns.ListCaption]);
                this.mListTypeName   = AppShared.DbValueToString(dr[Columns.ListTypeName]);
                this.mName           = AppShared.DbValueToString(dr[Columns.Name]);
                this.mTypeName       = AppShared.DbValueToString(dr[Columns.TypeName]);
                this.mDescription    = AppShared.DbValueToString(dr[Columns.Desc]);
                this.mCreatedByUser  = AppShared.DbValueToGuid(dr[Columns.CreatedBy]);
                this.mCreatedOn      = AppShared.DbValueToDateTime(dr[Columns.CreatedOn]);
                this.mModifiedByUser = AppShared.DbValueToGuid(dr[Columns.ModifiedBy]);
                this.mModifiedOn     = AppShared.DbValueToDateTime(dr[Columns.ModifiedOn]);
                this.Status          = ObjectStatus.Opened;
                r = true;
            }
            else
            {
                this.Reset();
            }

            return(r);
        }
Exemple #2
0
        internal override bool Populate(SqlDataReader dr)
        {
            bool r = false;

            if (dr != null && AppShared.IsNotNull(dr[Columns.UserGuid]))
            {
                this.mId              = AppShared.DbValueToInteger(dr[Columns.UserId]);
                this.mObjectGuid      = AppShared.DbValueToGuid(dr[Columns.UserGuid]);
                this.mName            = AppShared.DbValueToString(dr[Columns.UserName]);
                this.mLoginName       = AppShared.DbValueToString(dr[Columns.UserLoginName]);
                this.mUserRoleGuid    = AppShared.DbValueToGuid(dr[Columns.UserRoleGuid]);
                this.mPassword        = AppShared.DbValueToString(dr[Columns.UserPassword]);
                this.mAddressLine1    = AppShared.DbValueToString(dr[Columns.UserAddressLine1]);
                this.mAddressLine2    = AppShared.DbValueToString(dr[Columns.UserAddressLine2]);
                this.mAddressLine3    = AppShared.DbValueToString(dr[Columns.UserAddressLine3]);
                this.mPhoneNo         = AppShared.DbValueToString(dr[Columns.UserPhoneNo]);
                this.mMobileNo        = AppShared.DbValueToString(dr[Columns.UserMobileNo]);
                this.mPhoto           = AppShared.DbValueToBytes(dr, Columns.UserPhoto);
                this.mWindowsUserName = AppShared.DbValueToString(dr[Columns.UserWindowsUserName]);
                // this.mIsBlocked = AppShared.DbValueToBoolean(dr[Columns.UserIsDisable]);
                this.mIsDisabled     = AppShared.DbValueToBoolean(dr[Columns.UserIsDisable]);
                this.mDescription    = AppShared.DbValueToString(dr[Columns.UserDesc]);
                this.mDoctorShare    = AppShared.DbValueToDecimal(dr[Columns.DoctorShare]);
                this.mCreatedByUser  = AppShared.DbValueToGuid(dr[Columns.UserCreatedBy]);
                this.mCreatedOn      = AppShared.DbValueToDateTime(dr[Columns.UserCreatedOn]);
                this.mModifiedByUser = AppShared.DbValueToGuid(dr[Columns.UserModifiedBy]);
                this.mModifiedOn     = AppShared.DbValueToDateTime(dr[Columns.UserModifiedOn]);
                //dr.GetBytes(dr.GetOrdinal(Columns.UserRowStamp), 0, this.mRowStamp, 0, 8);

                this.Status = ObjectStatus.Opened;
                r           = true;
            }
            else
            {
                this.Reset();
            }
            return(r);
        }