Esempio n. 1
0
        public string CheckDuplicateIDNo(Guid? ID, string idNo)
        {
            // Kiểm tra có check trùng dữ liệu hay không
            var hre_profileservices = new Hre_ProfileServices();
            Boolean ischeck = hre_profileservices.IsCheckDuplidateIDNo();
            if (ischeck == false)
            {
                return null;
            }

            if (ID == null)
            {
                ID = Guid.Empty;
            }
            string profile = null;
            string status = string.Empty;
            var actionService = new ActionService(UserLogin);
            var objs = new List<object>();
            objs.Add(ID);
            objs.Add(idNo);
            objs.Add(1);
            objs.Add(10000);
            var profileByIdNo = actionService.GetData<Hre_ProfileEntity>(objs, ConstantSql.hrm_hr_sp_get_ProfileByIDNo, ref status).FirstOrDefault();
            if (profileByIdNo != null && profileByIdNo.IsBlackList == true)
            {
                profile = "Black";
            }
            else if (profileByIdNo != null && (profileByIdNo.IsBlackList == null || profileByIdNo.IsBlackList == false))
            {
                profile = profileByIdNo.ProfileName;
            }

            return profile;
        }