Removed PdfViewController, HtmlViewRenderer and FakeView to be replaced with ViewEngineResult Render method

Added HttpException class for missing HttpException for net8

Wrapped HttpContext.Session, GetJsonResult, IsAjaxRequest and GetUserIdentityName in controllers for net8

Added AuthenticationService to test Fab2ApprovalMKLink code for net8

Compile conditionally flags to debug in dotnet core
This commit is contained in:
2025-05-23 12:51:42 -07:00
parent 184e97fce3
commit 7650bf2869
85 changed files with 3655 additions and 1259 deletions

View File

@ -46,7 +46,9 @@ public class TrainingDMO {
IEnumerable<Training> allTrainings = (from a in db.Trainings select a).ToList();
return allTrainings;
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -57,7 +59,9 @@ public class TrainingDMO {
Training trainingRecord = new Training();
trainingRecord = (from a in db.Trainings where a.TrainingID == trainingId select a).FirstOrDefault();
return trainingRecord;
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -67,7 +71,9 @@ public class TrainingDMO {
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
TrainingAssignment assignmentRecord = (from a in db.TrainingAssignments where a.ID == assignmentId select a).FirstOrDefault();
return assignmentRecord;
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -79,7 +85,9 @@ public class TrainingDMO {
int trainingId = (from a in db.Trainings where a.ECN == ECNId select a.TrainingID).FirstOrDefault();
return trainingId;
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -90,7 +98,9 @@ public class TrainingDMO {
var users = (from a in db.TrainingGroupMembers where a.TrainingGroupID == groupId select a.UserID).ToList();
return users;
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -105,7 +115,9 @@ public class TrainingDMO {
} else {
return true;
}
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -114,8 +126,11 @@ public class TrainingDMO {
#if !NET8
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
return (from a in db.TrainingGroups select a).ToList();
#else
throw new NotImplementedException();
#endif
#if NET8
System.Text.StringBuilder query = new("SELECT TrainingGroupID, TrainingGroupName FROM TrainingGroups ORDER BY TrainingGroupID");
return db.Query<TrainingGroup>(query.ToString()).ToList();
#endif
}
@ -124,7 +139,9 @@ public class TrainingDMO {
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
TrainingGroup groups = (from a in db.TrainingGroups where a.TrainingGroupID == groupId select a).FirstOrDefault();
return groups;
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -134,7 +151,9 @@ public class TrainingDMO {
List<int> trainingGroups = (from a in FabApprovalDB.ECNTrainingBies where a.ECNNumber == ECNNumber select a.AcknowledgementTrainingByID).ToList();
return trainingGroups;
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -149,7 +168,9 @@ public class TrainingDMO {
this.db.Execute("ECNInsertTrainingBy", parameters, commandType: CommandType.StoredProcedure);
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -162,7 +183,9 @@ public class TrainingDMO {
this.db.Execute("ECNSetTrainingFlag", parameters, commandType: CommandType.StoredProcedure);
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -177,7 +200,9 @@ public class TrainingDMO {
TrainingData = from a in db.TrainingAssignments where a.TrainingID == TrainingID select a;
return TrainingData.ToList();
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -192,7 +217,9 @@ public class TrainingDMO {
TrainingData = from a in db.TrainingAssignments where a.TrainingID == TrainingID select a;
return TrainingData.ToList();
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -203,7 +230,9 @@ public class TrainingDMO {
var TrainingData = from a in db.TrainingAssignments where a.TrainingID == TrainingID && a.UserID == userID select a;
return TrainingData.ToList();
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -214,7 +243,9 @@ public class TrainingDMO {
var docs = (from a in db.TrainingDocAcks where a.TrainingAssignmentID == trainingAssignmentId && a.Deleted != true select a).ToList();
return docs;
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -240,7 +271,9 @@ public class TrainingDMO {
Console.WriteLine(e);
}
}
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -251,7 +284,9 @@ public class TrainingDMO {
int trainingID = (from a in db.TrainingAssignments where a.ID == trainingAssignmentID select a.TrainingID).SingleOrDefault();
return trainingID;
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -272,7 +307,9 @@ public class TrainingDMO {
Console.WriteLine(e);
}
}
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -293,7 +330,9 @@ public class TrainingDMO {
Console.WriteLine(e);
}
}
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -311,7 +350,9 @@ public class TrainingDMO {
}
}
return isFinished;
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -331,7 +372,9 @@ public class TrainingDMO {
}
return isFinished;
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -348,7 +391,9 @@ public class TrainingDMO {
}
return userHasAssignment;
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -359,7 +404,9 @@ public class TrainingDMO {
var trainings = from a in db.Trainings select a;
return trainings.ToList();
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -370,7 +417,9 @@ public class TrainingDMO {
var trainingAssignments = from a in db.TrainingAssignments where a.UserID == userID && a.Deleted != true select a;
return trainingAssignments.ToList();
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -390,7 +439,9 @@ public class TrainingDMO {
string exception = e.ToString();
Console.WriteLine(e);
}
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -410,7 +461,9 @@ public class TrainingDMO {
string exception = e.ToString();
Console.WriteLine(e);
}
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -431,7 +484,9 @@ public class TrainingDMO {
DeleteTrainingAssignment(trainingAssignment.ID);
DeleteTrainingDocAck(trainingAssignment.ID);
}
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -451,7 +506,9 @@ public class TrainingDMO {
}
DeleteTrainingAssignment(item.ID);
}
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -478,7 +535,9 @@ public class TrainingDMO {
} else {
return false;
}
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -488,7 +547,9 @@ public class TrainingDMO {
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
List<Training> openTrainings = (from a in db.Trainings where a.Status != true && a.Deleted != true select a).ToList();
return openTrainings;
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}
@ -498,7 +559,9 @@ public class TrainingDMO {
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
List<TrainingAssignment> openAssignments = (from a in FabApprovalDB.TrainingAssignments where a.TrainingID == trainingID && a.status != true && a.Deleted != true select a).ToList();
return openAssignments;
#else
#endif
#if NET8
throw new NotImplementedException();
#endif
}