예제 #1
0
        public static List <WorkTypeInfo> getAllWorkTypes()
        {
            WorkTypeTableAdapter workTypeAdapter = new WorkTypeTableAdapter();

            NuRacingDataSet.WorkTypeDataTable WorkTypeTable = workTypeAdapter.GetData();

            List <WorkTypeInfo> result = new List <WorkTypeInfo>();

            foreach (NuRacingDataSet.WorkTypeRow WorkTypeRow in WorkTypeTable.Rows)
            {
                result.Add(new WorkTypeInfo(WorkTypeRow));
            }

            return(result);
        }
예제 #2
0
        public static List <WorkTypeInfo> getActiveWorkTypes()
        {
            WorkTypeTableAdapter workTypeAdapter = new WorkTypeTableAdapter();

            NuRacingDataSet.WorkTypeDataTable WorkTypeTable = workTypeAdapter.GetData();

            List <WorkTypeInfo> result = new List <WorkTypeInfo>();

            foreach (NuRacingDataSet.WorkTypeRow WorkTypeRow in WorkTypeTable.Rows)
            {
                if (BusinessLogicLayer.Project.projectActive(WorkTypeRow.Project_UID))
                {
                    result.Add(new WorkTypeInfo(WorkTypeRow));
                }
            }

            return(result);
        }
예제 #3
0
        public static void AddWorkType(int ProjectID, string Name)
        {
            if (!Project.projectExists(ProjectID))
            {
                throw new ArgumentException("ProjectID wasn't valid");
            }

            WorkTypeTableAdapter workTypeAdapter = new WorkTypeTableAdapter();
            NuRacingDataSet.WorkTypeDataTable WorkTypeTable = workTypeAdapter.GetData();
            NuRacingDataSet.WorkTypeRow WorkTypeRow = WorkTypeTable.NewWorkTypeRow();

            WorkTypeRow.Project_UID = ProjectID;
            WorkTypeRow.WorkType_Name = Name;
            WorkTypeRow.WorkType_Status = "Planning";
            WorkTypeRow.WorkType_StatusChangedDate = DateTime.Now;

            WorkTypeTable.AddWorkTypeRow(WorkTypeRow);

            workTypeAdapter.Update(WorkTypeTable);
        }
예제 #4
0
        static public void AddWorkType(int ProjectID, string Name)
        {
            if (!Project.projectExists(ProjectID))
            {
                throw new ArgumentException("ProjectID wasn't valid");
            }

            WorkTypeTableAdapter workTypeAdapter = new WorkTypeTableAdapter();

            NuRacingDataSet.WorkTypeDataTable WorkTypeTable = workTypeAdapter.GetData();
            NuRacingDataSet.WorkTypeRow       WorkTypeRow   = WorkTypeTable.NewWorkTypeRow();

            WorkTypeRow.Project_UID                = ProjectID;
            WorkTypeRow.WorkType_Name              = Name;
            WorkTypeRow.WorkType_Status            = "Planning";
            WorkTypeRow.WorkType_StatusChangedDate = DateTime.Now;

            WorkTypeTable.AddWorkTypeRow(WorkTypeRow);

            workTypeAdapter.Update(WorkTypeTable);
        }
예제 #5
0
        public static List<WorkTypeInfo> getActiveWorkTypes()
        {
            WorkTypeTableAdapter workTypeAdapter = new WorkTypeTableAdapter();
            NuRacingDataSet.WorkTypeDataTable WorkTypeTable = workTypeAdapter.GetData();

            List<WorkTypeInfo> result = new List<WorkTypeInfo>();

            foreach (NuRacingDataSet.WorkTypeRow WorkTypeRow in WorkTypeTable.Rows)
            {
                if (BusinessLogicLayer.Project.projectActive(WorkTypeRow.Project_UID))
                {
                    result.Add(new WorkTypeInfo(WorkTypeRow));
                }
            }

            return result;
        }
예제 #6
0
        public static List<WorkTypeInfo> getAllWorkTypes()
        {
            WorkTypeTableAdapter workTypeAdapter = new WorkTypeTableAdapter();
            NuRacingDataSet.WorkTypeDataTable WorkTypeTable = workTypeAdapter.GetData();

            List<WorkTypeInfo> result = new List<WorkTypeInfo>();

            foreach (NuRacingDataSet.WorkTypeRow WorkTypeRow in WorkTypeTable.Rows)
            {
                result.Add(new WorkTypeInfo(WorkTypeRow));
            }

            return result;
        }