示例#1
0
        protected override void FillRowViewInfos(XModelBase model, System.Data.DataRow modelRow)
        {
            XVStaffInfoInfo staffInfo = model as XVStaffInfoInfo;

            staffInfo.LoginUserName = XHelper.GetString(modelRow["LoginUserName"]);
            staffInfo.DeptName      = XHelper.GetString(modelRow["DeptName"]);
        }
示例#2
0
        /// <summary>
        /// 设置修改时的默认值
        /// </summary>
        protected override void SetDefaultValue()
        {
            XVStaffInfoInfo info = this.m_CurrentModel as XVStaffInfoInfo;


            this.txtUserName.Text           = info.UserName;
            this.txtUserSex.Text            = info.UserSex;
            this.txtNationality.Text        = info.Nationality;
            this.nebUserAge.Value           = info.UserAge;
            this.dtBirthday.Value           = XHelper.GetDateTime(info.Birthday);
            this.txtNativePlace.Text        = info.NativePlace;
            this.dtStartWorkDate.Value      = XHelper.GetDateTime(info.StartWorkDate);
            this.dtToCompWorkDate.Value     = XHelper.GetDateTime(info.ToCompWorkDate);
            this.txtPersonID.Text           = info.PersonID;
            this.txtSpecialty.Text          = info.Specialty;
            this.txtHouseHoldAddr.Text      = info.HouseHoldAddr;
            this.txtHomeAddress.Text        = info.HomeAddress;
            this.txtHomeTel.Text            = info.HomeTel;
            this.txtMobileNo.Text           = info.MobileNo;
            this.txtWorkTel.Text            = info.WorkTel;
            this.txtEducation.Text          = info.Education;
            this.txtMajor.Text              = info.Major;
            this.txtUniversity.Text         = info.University;
            this.nebMeasureWorkYears.Value  = info.MeasureWorkYears;
            this.txtMeasureWorkContent.Text = info.MeasureWorkContent;

            if (info.DeptId != string.Empty)
            {
                this.txtDeptId.Text          = info.DeptName;
                this.txtDeptId.ValueMember   = info.DeptId;
                this.txtDeptId.DisplayMember = info.DeptName;
            }

            this.txtPost.Text   = info.Post;
            this.txtRoleId.Text = info.RoleId;

            if (info.UserId != string.Empty)
            {
                this.txtUserId.Text          = info.LoginUserName;
                this.txtUserId.ValueMember   = info.UserId;
                this.txtUserId.DisplayMember = info.LoginUserName;

                this.m_OldUserId = info.UserId;
            }

            this.txtRemark.Text = info.Remark;
        }
示例#3
0
        /// <summary>
        /// 填充实体信息
        /// </summary>
        protected override void FillModelInfo()
        {
            XVStaffInfoInfo info = this.m_CurrentModel as XVStaffInfoInfo;

            if (this.m_EditStatus == XEditStatus.AddNew)
            {
                info.RID = this.GetNewId();
            }

            info.UserName           = this.txtUserName.Text;
            info.UserSex            = this.txtUserSex.Text;
            info.Nationality        = this.txtNationality.Text;
            info.UserAge            = XHelper.GetInt(this.nebUserAge.Value);
            info.Birthday           = XHelper.GetFormatedDate(this.dtBirthday.Value);
            info.NativePlace        = this.txtNativePlace.Text;
            info.StartWorkDate      = XHelper.GetFormatedDate(this.dtStartWorkDate.Value);
            info.ToCompWorkDate     = XHelper.GetFormatedDate(this.dtToCompWorkDate.Value);
            info.PersonID           = this.txtPersonID.Text;
            info.Specialty          = this.txtSpecialty.Text;
            info.HouseHoldAddr      = this.txtHouseHoldAddr.Text;
            info.HomeAddress        = this.txtHomeAddress.Text;
            info.HomeTel            = this.txtHomeTel.Text;
            info.MobileNo           = this.txtMobileNo.Text;
            info.WorkTel            = this.txtWorkTel.Text;
            info.Education          = this.txtEducation.Text;
            info.Major              = this.txtMajor.Text;
            info.University         = this.txtUniversity.Text;
            info.MeasureWorkYears   = XHelper.GetInt(this.nebMeasureWorkYears.Value);
            info.MeasureWorkContent = this.txtMeasureWorkContent.Text;
            info.DeptId             = this.txtDeptId.ValueMember;
            info.DeptName           = this.txtDeptId.DisplayMember;
            info.Post          = this.txtPost.Text;
            info.RoleId        = this.txtRoleId.Text;
            info.UserId        = this.txtUserId.ValueMember;
            info.LoginUserName = this.txtUserId.DisplayMember;
            info.Remark        = this.txtRemark.Text;

            if (this.txtFilePath.Text.Trim() != string.Empty)
            {
                info.FileName = this.txtFilePath.Text.Trim();
            }

            base.FillModelInfo();
        }