예제 #1
0
        public string CheckDuplicateCodeEmp(Guid? ID, string codeEmp)
        {
            // Kiểm tra có check trùng dữ liệu hay không
            var hre_profileservices = new Hre_ProfileServices();
            Boolean ischeck = hre_profileservices.IsCheckDuplidateCodeEmp();

            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(codeEmp);
            objs.Add(1);
            objs.Add(10000);

            var profilename = actionService.GetData<Hre_ProfileEntity>(objs, ConstantSql.hrm_hr_sp_get_ProfileByCodeEmp, ref status);
            if (profilename != null)
            {
                var profilebyid = profilename.FirstOrDefault();
                if (profilebyid != null)
                {
                    profile = profilebyid.ProfileName;
                }
            }

            return profile;
        }