public void CreateEmployee()
        {
            EmployeeEntity employeeCreationBLL = new EmployeeEntity();
            Employee       employee            = new Employee();

            employee.FirstName = "test";
            employee.LastName  = "demo";
            employee.Gender    = "M";
            employee.Phone     = "13454521622";
            employee.Address   = "Beijing";
            employee.Birth     = Convert.ToDateTime("1998-1-1");

            bool result = employeeCreationBLL.CreateEmployee(employee);

            EmployeeDataEntity.EmployeeBase.Clear();

            Assert.IsTrue(result);
        }
        public void CreateEmployee()
        {
            Console.WriteLine("\n\n");
            Console.WriteLine(ResourceCulture.GetString("CreateInfo"));

            Employee     employeeItem = new Employee();
            CommonEntity commonEntity = new CommonEntity();
            bool         valid        = false;

            //get first name
            valid = false;
            string inputFirstName = null;

            Console.WriteLine(ResourceCulture.GetString("FirstNameInputTips"));
            while (!valid)
            {
                inputFirstName = Console.ReadLine().Trim();
                valid          = commonEntity.IsValidName(inputFirstName);
                if (!valid)
                {
                    Console.WriteLine(ResourceCulture.GetString("FirstNameInputError"));
                }
            }
            employeeItem.FirstName = inputFirstName;

            //get last name
            valid = false;
            string inputlastName = null;

            Console.WriteLine(ResourceCulture.GetString("LastNameInputTips"));
            while (!valid)
            {
                inputlastName = Console.ReadLine().Trim();
                valid         = commonEntity.IsValidName(inputlastName);
                if (!valid)
                {
                    Console.WriteLine(ResourceCulture.GetString("FirstNameInputError"));
                }
            }
            employeeItem.LastName = inputlastName;

            //get input gender
            valid = false;
            string inputGender = null;

            Console.WriteLine(ResourceCulture.GetString("GenderInputTips"));
            while (!valid)
            {
                inputGender = Console.ReadLine().Trim();
                valid       = commonEntity.IsValidGender(inputGender);
                if (!valid)
                {
                    Console.WriteLine(ResourceCulture.GetString("GenderInputError"));
                }
            }
            employeeItem.Gender = inputGender;

            //get input birthday
            valid = false;
            string inputBirth = null;

            Console.WriteLine(ResourceCulture.GetString("BirthInputTips"));
            while (!valid)
            {
                inputBirth = Console.ReadLine().Trim();
                valid      = commonEntity.IsValidBirthday(inputBirth);
                if (!valid)
                {
                    Console.WriteLine(ResourceCulture.GetString("BirthInputError"));
                }
            }
            employeeItem.Birth = Convert.ToDateTime(inputBirth);

            //get input address
            valid = false;
            string inputAddress = null;

            Console.WriteLine(ResourceCulture.GetString("AddressInputTips"));
            while (!valid)
            {
                inputAddress = Console.ReadLine().Trim();
                valid        = commonEntity.IsValidAddress(inputAddress);
                if (!valid)
                {
                    Console.WriteLine(ResourceCulture.GetString("AddressInputError"));
                }
            }
            employeeItem.Address = inputAddress;

            //get input phone
            valid = false;
            string inputPhone = null;

            Console.WriteLine(ResourceCulture.GetString("PhoneInputTips"));
            while (!valid)
            {
                inputPhone = Console.ReadLine().Trim();
                valid      = commonEntity.IsValidPhone(inputPhone);
                if (!valid)
                {
                    Console.WriteLine(ResourceCulture.GetString("PhoneInputError"));
                }
            }
            employeeItem.Phone = inputPhone;

            //creation
            EmployeeEntity employeeCreationBLL = new EmployeeEntity();
            bool           result = employeeCreationBLL.CreateEmployee(employeeItem);

            if (result)
            {
                Console.WriteLine("\n\n" + ResourceCulture.GetString("CreateSuccessInfo") + "\n");
            }
            else
            {
                Console.WriteLine("\n\n" + ResourceCulture.GetString("CreateFailInfo") + "\n");
            }
        }