Example #1
0
 private List<DeptManager> GetValidDeptManagers()
 {
     RosterListProc = new sm_GetDepartmentManagers(Database.Connection, Database.StoreId);
     RosterListProc.Execute();
     List<DeptManager> list = RosterListProc.Result;
     return list;
 }
Example #2
0
        private void RefreshDeptManagersList()
        {
            RosterListProc = new sm_GetDepartmentManagers(Database.Connection, Database.StoreId);
            RosterListProc.Execute();
            List<DeptManager> list = RosterListProc.Result;

            RostersListView.Items.Clear();

            foreach (DeptManager dm in list)
            {
                string[] itm = new string[4];
                itm[0] = dm.UserId.ToString();
                itm[1] = dm.FirstName;
                itm[2] = dm.LastName;

                if (dm.Dept == null)
                {
                    itm[3] = "None";
                }
                else
                {
                    itm[3] = dm.Dept.Name;
                }

                RostersListView.Items.Add(new ListViewItem(itm));
            }
        }
Example #3
0
        private DeptManager FindDepartmentManager(int deptId)
        {
            RosterListProc = new sm_GetDepartmentManagers(Database.Connection, Database.StoreId);
            RosterListProc.Execute();
            List<DeptManager> list = RosterListProc.Result;

            foreach (DeptManager dm in list)
            {
                if(dm.Dept != null)
                {
                    if (dm.Dept.DepartmentId == deptId) return dm;
                }
            }

            return null;
        }