Example #1
0
        /// <summary>
        /// 获取体检单位分组数据
        /// </summary>
        /// <param name="GroupID"></param>
        /// <param name="DeptID"></param>
        /// <returns>体检单位分组实体</returns>
        public DepartmentGroupViewEntity GetDepartmentGroup(int DeptID, int GroupID)
        {
            DepartmentGroupPK ID = new DepartmentGroupPK {
                DeptID = DeptID, GroupID = GroupID
            };
            DepartmentGroupViewEntity Result = Session.Get <DepartmentGroupViewEntity>(ID);

            CloseSession();
            return(Result);
        }
    /// <summary>
    /// 填充界面
    /// </summary>
    private void SetDepartmentGroupUI()
    {
        DepartmentGroupViewEntity Result = m_DeptGroup.GetDepartmentGroup(DeptID, GroupID);

        if (Result == null)
        {
            return;
        }
        txtGroupName.Text     = Result.GroupName;
        drpSex.SelectedValue  = Result.Sex;
        chkIsChildren.Checked = false;
        if (Result.IsChildren.HasValue)
        {
            chkIsChildren.Checked = Result.IsChildren.Value;
        }
        txtDuty.Text        = Result.Duty;
        txtPosition.Text    = Result.Position;
        txtPackageName.Text = Result.PackageName;
        hPackageID.Value    = Result.PackageID + "";
    }