public DepartmentComputerSystem Get(Department department)
            {
                DepartmentComputerSystem dcs = null;
                string query = string.Format(
                    "SELECT dcs FROM {0} dcs WHERE dcs.Department=VAR({1}, department)",
                    FullInstanceClassName,
                    department.FullClassName);

                using (SqlEnumerator<DepartmentComputerSystem> systems = Sql.GetEnumerator<DepartmentComputerSystem>(query))
                {
                    systems.SetVariable("department", department);

                    if (systems.MoveNext())
                    {
                        dcs = systems.Current;
                    }
                }
                return dcs;
            }
 public void SetDepartment(Department department)
 {
     SetToWhat(department);
 }
Example #3
0
 /// <summary>
 /// Sets owner of this department.
 /// </summary>
 /// <param name="department">Owner</param>
 public void SetOwner(Department department)
 {
     Owner = department;
 }
 public DepartmentComputerSystem(Department department)
 {
     Department = department;
     Owner = department;
 }
Example #5
0
 public void SetDepartment(Department department)
 {
     SetWhatIs(department);
 }