Esempio n. 1
0
        public string CheckDuplicateProfileNameAndBirthDay(Guid? ID, string profileName, string day, string month, string year)
        {
            // Kiểm tra có check trùng dữ liệu hay không
            var hre_profileservices = new Hre_ProfileServices();
            Boolean ischeck = hre_profileservices.IsCheckDuplidateProfileNameAndBirthDay();
            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(profileName);
            objs.Add(day);
            objs.Add(month);
            objs.Add(year);
            objs.Add(1);
            objs.Add(10000);
            var profilename = actionService.GetData<Hre_ProfileEntity>(objs, ConstantSql.hrm_hr_sp_get_ProfileByProfileNameAndBirthDay, ref status);

            if (profilename != null && profilename.Count > 0)
            {
                foreach (var item in profilename)
                {
                    profile = item.ProfileName + " - " + item.CodeEmp + ", ";
                }

                profile = profile.Substring(0, profile.Length - 2);
            }
            return profile;
        }