Exemplo n.º 1
0
        /// <summary>
        /// 根据传入对象信息填充UC
        /// </summary>
        private void setInfoToControls()
        {
            this.txtEmployeeCode.Text = this.employee.ID;        //人员编码
            this.txtEmployeeName.Text = this.employee.Name;      //人员姓名
            this.txtSpell_Code.Text   = this.employee.SpellCode; //拼音码
            this.txtWB_Code.Text      = this.employee.WBCode;    //五笔码
            this.comboSex.Tag         = this.employee.Sex.ID;    //性别

            //[2007-01-25]防止.NET与ORACLE表示范围不同
            //{997CB50F-1CE4-40d3-9A67-5128EAA10FD7}
            this.comboBirthday.Value = this.employee.Birthday;//出生日期
            //if (this.employee.Birthday.CompareTo(DateTime.MinValue.AddYears(1969)) <= 0 )
            //{
            //    this.comboBirthday.Value = DateTime.MinValue.AddYears(1969);
            //}
            //else
            //{
            //    this.comboBirthday.Value = this.employee.Birthday;//出生日期
            //}

            this.comboPersonEdu.Tag  = this.employee.GraduateSchool.ID; //毕业学校
            this.txtIdentity.Text    = this.employee.IDCard;            //身份证
            this.comboDuty.Tag       = this.employee.Duty.ID;           //职务
            this.comboLevel.Tag      = this.employee.Level.ID;          //职级
            this.comboDeptType.Tag   = this.employee.Dept.ID;           //所属科室
            this.comboNurse.Tag      = this.employee.Nurse.ID;          //所属护理站
            this.comboPersonType.Tag = this.employee.EmployeeType.ID;   //人员类型
            this.numSortId.Text      = this.employee.SortID.ToString(); //顺序号
            if (this.employee.IsExpert)                                 //是否为专家
            {
                this.neuRadioButton1.Checked = true;
            }
            else
            {
                this.neuRadioButton2.Checked = true;
            }
            if (this.employee.IsCanModify)//是否能改票据
            {
                this.neuRadioButton3.Checked = true;
            }
            else
            {
                this.neuRadioButton4.Checked = true;
            }
            if (this.employee.IsNoRegCanCharge)//是否直接收费
            {
                this.neuRadioButton5.Checked = true;
            }
            else
            {
                this.neuRadioButton6.Checked = true;
            }
            switch (this.employee.ValidState)//有效性
            {
            case Neusoft.HISFC.Models.Base.EnumValidState.Valid:
                this.radioValidate1.Checked = true;
                break;

            case Neusoft.HISFC.Models.Base.EnumValidState.Invalid:
                this.radioValidate2.Checked = true;
                break;

            case Neusoft.HISFC.Models.Base.EnumValidState.Ignore:
                this.radioValidate3.Checked = true;
                break;

            default:
                break;
            }
            this.txtUser_Code.Text = this.employee.UserCode;
            //{6A8C59DC-91FE-4246-A923-06A011918614}
            this.rtxtMark.SuperText = this.employee.Memo;

            #region donggq--20101118--{45E71A4E-803A-47fd-AC24-9BED6E530F16}--数字签名

            byte[] digitalSign = personMgr.GetEmplDigitalSignByID(employee.ID);
            if (digitalSign != null)
            {
                System.IO.MemoryStream msPic = new System.IO.MemoryStream(digitalSign);
                Bitmap bmpt = new Bitmap(msPic);
                this.picBox.Image = bmpt;
            }

            #endregion
        }