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;
            }
Пример #2
0
 public void SetDepartment(Department department)
 {
     SetToWhat(department);
 }
Пример #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;
 }
Пример #5
0
 public void SetDepartment(Department department)
 {
     SetWhatIs(department);
 }