Beispiel #1
0
        /// <summary>
        /// 验证职位上下限是否跨越多个区间
        /// </summary>
        /// <returns></returns>
        private bool CheckSortNum()
        {
            bool bFlag = true;

            if (base.MinSortNum > 0 && base.MaxSortNum > 0)
            {
                DataTable dt = Position.GetSortNumDT(base.ID);
                foreach (DataRow dr in dt.Rows)
                {
                    if (Convert.ToInt32(dr["MinSortNum"]) < base.MinSortNum && Convert.ToInt32(dr["MinSortNum"]) > base.MaxSortNum)
                    {
                        bFlag = false;
                        break;
                    }
                }
            }
            return(bFlag);
        }
Beispiel #2
0
        /// <summary>
        /// 验证职位上下限是否在原来的范围内
        /// </summary>
        /// <param name="sortNum"></param>
        /// <returns></returns>
        private bool CheckSortNum(int sortNum)
        {
            bool bFlag = true;

            if (sortNum != -1)
            {
                DataTable dt = Position.GetSortNumDT(base.ID);
                foreach (DataRow dr in dt.Rows)
                {
                    if (sortNum <= Convert.ToInt32(dr["MinSortNum"]) && sortNum >= Convert.ToInt32(dr["MaxSortNum"]))
                    {
                        bFlag = false;
                        break;
                    }
                }
            }
            return(bFlag);
        }