예제 #1
0
        public static OrgChartTrackerItemCollection GetCollectionForUser(int userID)
        {
            OrgChartTrackerItemCollection collection = null;

            try
            {
                DataTable table = ExecuteDataTable("spr_GetAllOrgChartTrackerItemsByUserID", userID);

                // fill collection list
                collection = OrgChartTrackerItem.GetCollection(table);
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }

            return(collection);
        }
예제 #2
0
        private static OrgChartTrackerItemCollection GetCollection(DataTable table)
        {
            OrgChartTrackerItemCollection collection = new OrgChartTrackerItemCollection();

            try
            {
                if (table != null)
                {
                    for (int i = 0; i < table.Rows.Count; i++)
                    {
                        OrgChartTrackerItem item = new OrgChartTrackerItem(table.Rows[i]);
                        collection.Add(item);
                    }
                }
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }

            return(collection);
        }