Beispiel #1
0
        /// <summary>
        /// 删除部门信息
        /// 删除前需要注意是否有外表关联
        /// </summary>
        /// <param name="departmentNo"></param>
        /// <returns></returns>
        public bool Delete(string departmentNo)
        {
            Dictionary <string, object> paramsMap = new Dictionary <string, object>();

            paramsMap.Add("Dept.dept_No", departmentNo);
            SqlDataReader reader = new Staff().Query(paramsMap);

            if (!reader.Read())
            {
                return(sqlDepartment.DeleteDepartmentInfo(departmentNo));
            }
            else
            {
                return(false);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 删除岗位信息
        /// 删除前需要注意是否有外表关联
        /// </summary>
        /// <param name="jobNo"></param>
        /// <returns></returns>
        public bool Delete(string jobNo)
        {
            Dictionary <string, object> paramsMap = new Dictionary <string, object>();

            paramsMap.Add("Job.job_No", jobNo);
            SqlDataReader reader = new Staff().Query(paramsMap);

            if (!reader.Read())
            {
                return(sqlJob.DeleteJobInfo(jobNo));
            }
            else
            {
                return(false);
            }
        }