Пример #1
0
        /// <summary>
        /// 窗体加载
        /// </summary>
        private void FormPersonnelArchiveList_Load(object sender, EventArgs e)
        {
            DataTable postDt = m_PostServer.GetOperatingPost(null);

            for (int i = 0; i < postDt.Rows.Count; i++)
            {
                cmbWorkPost.Items.Add(postDt.Rows[i]["岗位名称"].ToString());
            }

            DataTable jobDt = m_JobServer.GetJobTitleOut();

            for (int i = 0; i < jobDt.Rows.Count; i++)
            {
                cmbJobTitle.Items.Add(jobDt.Rows[i]["职称名称"].ToString());
            }

            DataTable levelDt = m_JobServer.GetJobTitleLevel();

            for (int i = 0; i < levelDt.Rows.Count; i++)
            {
                cmbLevel.Items.Add(levelDt.Rows[i]["职称名称"].ToString());
            }

            DataTable statusDt = m_personnerServer.GetPersonnelStatus();

            for (int i = 0; i < statusDt.Rows.Count; i++)
            {
                cmbStatus.Items.Add(statusDt.Rows[i]["status"].ToString());
            }

            IQueryable <View_HR_Dept> m_findDepartment;

            if (m_departmentServer.GetAllDeptInfo(out m_findDepartment, out error))
            {
                foreach (var item in m_findDepartment)
                {
                    cmbDept.Items.Add(item.部门名称);
                }
            }
        }
        private void 员工档案明细_Load(object sender, EventArgs e)
        {
            DataTable postDt = m_PostServer.GetOperatingPost(null);

            for (int i = 0; i < postDt.Rows.Count; i++)
            {
                cmbWorkPost.Items.Add(postDt.Rows[i]["岗位名称"].ToString());
            }

            DataTable jobDt = m_JobServer.GetJobTitleOut();

            for (int i = 0; i < jobDt.Rows.Count; i++)
            {
                cmbJobTitle.Items.Add(jobDt.Rows[i]["职称名称"].ToString());
            }

            DataTable levelDt = m_JobServer.GetJobTitleLevel();

            for (int i = 0; i < levelDt.Rows.Count; i++)
            {
                cmbLevel.Items.Add(levelDt.Rows[i]["职称名称"].ToString());
            }

            DataTable statusDt = m_personnerServer.GetPersonnelStatus();

            for (int i = 0; i < statusDt.Rows.Count; i++)
            {
                cmbStatus.Items.Add(statusDt.Rows[i]["status"].ToString());
            }

            IQueryable <View_HR_Dept> m_findDepartment;

            if (m_departmentServer.GetAllDeptInfo(out m_findDepartment, out m_error))
            {
                foreach (var item in m_findDepartment)
                {
                    cmbDept.Items.Add(item.部门名称);
                }
            }

            if (m_personnelChange != null)
            {
                AuthorityControl(m_authFlag);
                BindControl();
                FaceAuthoritySetting.SetVisibly(this.Controls, m_queryResult.HideFields);
            }
            else
            {
                修改toolStripButton1.Visible = false;

                txtCard.ReadOnly       = false;
                txtName.ReadOnly       = false;
                txtWorkID.ReadOnly     = false;
                dtpBirthday.Value      = ServerTime.Time;
                dtpJoinDate.Value      = ServerTime.Time;
                dtpBecomeDate.Value    = ServerTime.Time;
                dtpTakeJobDate.Value   = ServerTime.Time;
                dtpDimissionDate.Value = ServerTime.Time;
            }

            toolStrip2.Visible = true;
        }