예제 #1
0
        public static DashboardCollection GetDashBoardPDs(int userID)
        {
            DashboardCollection childDataCollection = null;

            try
            {
                DataTable dataItems = new DataTable();
                dataItems = ExecuteDataTable("spr_GetUserPositionDescriptionCurrentStatusInfo", userID);

                // fill collection list
                childDataCollection = DashBoard.GetCollection(dataItems);
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }

            return(childDataCollection);
        }
예제 #2
0
        private static DashboardCollection GetCollection(DataTable dataItems)
        {
            DashboardCollection listCollection = new DashboardCollection();

            try
            {
                DashBoard current = null;

                if (dataItems != null)
                {
                    for (int i = 0; i < dataItems.Rows.Count; i++)
                    {
                        current = new DashBoard(dataItems.Rows[i]);
                        listCollection.Add(current);
                    }
                }
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }

            return(listCollection);
        }