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); }
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); }
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); }
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); }
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; }
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; }