private Item SelectDepartmentFromOptions()
        {
            IList items        = QDepartments.SelectItems2();
            Item  selectedItem = TemplatesController.ShowListBoxOptionsForm(items, view.ParentControl);

            return(selectedItem);
        }
示例#2
0
 private void LoadDepartments()
 {
     departments = QDepartments.SelectItems();
     foreach (Department department in departments)
     {
         view.AddDepartmentToComboBox(department);
     }
 }
示例#3
0
        public void Update(string departmentName, bool isActive)
        {
            LoginInfo loginInfo = LoginInfo.GetInstance();

            this.Name     = departmentName;
            this.IsActive = isActive;
            QDepartments.UpdateItem(this, loginInfo.UserName);
        }
示例#4
0
        public void Insert(string departmentName, bool isActive)
        {
            LoginInfo loginInfo = LoginInfo.GetInstance();

            this.Name     = departmentName;
            this.IsActive = isActive;
            int dbresult = QDepartments.InsertItem(this, loginInfo.UserName);
        }
        public void LoadView()
        {
            this.departments = QDepartments.SelectItems();
            this.directors   = QUsers.SelectUsersByRoleID(UserRoles.DepartmentDirector);

            AddDepartmentsToView();
            AddDirectorsToView();
            RefreshDepartmentDirectors();
        }
        public override void LoadView()
        {
            departments.Clear();
            view.ClearView();

            IList columns = new ArrayList()
            {
                "ID", "Department", "Active"
            };

            this.view.AddListViewColumns(columns);
            this.view.ListTitle = "Departments";
            departments         = QDepartments.SelectItems();

            AddDepartmentListToView();
            SetColumnsHeaderSize();
        }