public void SetUp()
        {
            employee  = new Employee(123, "Jean", "10 Rue de Roi");
            operation = new LoadEmployeeOperation(123, null);

            operation.Employee = employee;
        }
Ejemplo n.º 2
0
        public Employee GetEmployee(int id)
        {
            LoadEmployeeOperation loadOperation = new LoadEmployeeOperation(id, connection);

            loadOperation.Execute();
            return(loadOperation.Employee);
        }
        public void LoadingEmployeeDataCommand()
        {
            operation = new LoadEmployeeOperation(123, null);
            SqlCommand command = operation.LoadEmployeeCommand;

            Assert.AreEqual("select * from Employee " +
                            "where EmpId=@EmpId", command.CommandText);
            Assert.AreEqual(123, command.Parameters["@EmpId"].Value);
        }
        private DataRow LoadData()
        {
            if (tableName != null)
            {
                return(LoadEmployeeOperation.LoadDataFromCommand(Command));
            }

            return(null);
        }
 public Employee GetEmployee(int id)
 {
     LoadEmployeeOperation loadOperation = new LoadEmployeeOperation(id, connection);
     loadOperation.Execute();
     return loadOperation.Employee;
 }