2023-01-18 10:28:58.2623 Object cannot be cast from DBNull to other types. System.InvalidCastException: Object cannot be cast from DBNull to other types. at System.DBNull.System.IConvertible.ToDecimal(IFormatProvider provider) at System.Convert.ToDecimal(Object value) at SilSolver.WEB.Printing.PFDetails.load_action_At_DataTable(IEnumerable`1 ptProtFuncs, PSF_ProtectiveFunctionComments psf, DataTable DT_ProtectiveFunction, String _Inputs, Decimal& OverAllPFDPercent, Decimal& OverAllSTRPercent) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\PFDetails.cs:line 594 at SilSolver.WEB.Printing.PFDetails.PrintProject(Int32 _ProtectiveFunction_FK) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\PFDetails.cs:line 343 at SilSolver.WEB.Printing.ProjectEditPrinting.GeneratePFDetails(Int32 projectId, Int32 protectiveFunctionFk) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\ProjectEditPrinting.cs:line 492 at SilSolver.WEB.ProjectEdit.PfDetailsButtonClick(Object sender, EventArgs e) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\ProjectEdit.aspx.cs:line 964 2023-01-18 10:29:16.1862 Object cannot be cast from DBNull to other types. System.InvalidCastException: Object cannot be cast from DBNull to other types. at System.DBNull.System.IConvertible.ToDecimal(IFormatProvider provider) at System.Convert.ToDecimal(Object value) at SilSolver.WEB.Printing.PFDetails.load_action_At_DataTable(IEnumerable`1 ptProtFuncs, PSF_ProtectiveFunctionComments psf, DataTable DT_ProtectiveFunction, String _Inputs, Decimal& OverAllPFDPercent, Decimal& OverAllSTRPercent) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\PFDetails.cs:line 594 at SilSolver.WEB.Printing.PFDetails.PrintProject(Int32 _ProtectiveFunction_FK) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\PFDetails.cs:line 343 at SilSolver.WEB.Printing.ProjectEditPrinting.GeneratePFDetails(Int32 projectId, Int32 protectiveFunctionFk) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\ProjectEditPrinting.cs:line 492 at SilSolver.WEB.ProjectEdit.PfDetailsButtonClick(Object sender, EventArgs e) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\ProjectEdit.aspx.cs:line 964 2023-01-18 10:32:21.3911 Object cannot be cast from DBNull to other types. System.InvalidCastException: Object cannot be cast from DBNull to other types. at System.DBNull.System.IConvertible.ToDecimal(IFormatProvider provider) at System.Convert.ToDecimal(Object value) at SilSolver.WEB.Printing.PFDetails.load_action_At_DataTable(IEnumerable`1 ptProtFuncs, PSF_ProtectiveFunctionComments psf, DataTable DT_ProtectiveFunction, String _Inputs, Decimal& OverAllPFDPercent, Decimal& OverAllSTRPercent) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\PFDetails.cs:line 594 at SilSolver.WEB.Printing.PFDetails.PrintProject(Int32 _ProtectiveFunction_FK) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\PFDetails.cs:line 343 at SilSolver.WEB.Printing.ProjectEditPrinting.GeneratePFDetails(Int32 projectId, Int32 protectiveFunctionFk) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\ProjectEditPrinting.cs:line 492 at SilSolver.WEB.ProjectEdit.PfDetailsButtonClick(Object sender, EventArgs e) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\ProjectEdit.aspx.cs:line 964 2023-01-18 10:33:08.8800 Object cannot be cast from DBNull to other types. System.InvalidCastException: Object cannot be cast from DBNull to other types. at System.DBNull.System.IConvertible.ToDecimal(IFormatProvider provider) at System.Convert.ToDecimal(Object value) at SilSolver.WEB.Printing.PFDetails.load_action_At_DataTable(IEnumerable`1 ptProtFuncs, PSF_ProtectiveFunctionComments psf, DataTable DT_ProtectiveFunction, String _Inputs, Decimal& OverAllPFDPercent, Decimal& OverAllSTRPercent) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\PFDetails.cs:line 594 at SilSolver.WEB.Printing.PFDetails.PrintProject(Int32 _ProtectiveFunction_FK) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\PFDetails.cs:line 343 at SilSolver.WEB.Printing.ProjectMainPrinting.Get_HTML_PFDetails(Int32 _ProtectiveFunction_FK) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\ProjectMainPrinting.cs:line 552 2023-01-18 10:33:09.6031 Object cannot be cast from DBNull to other types. System.InvalidCastException: Object cannot be cast from DBNull to other types. at System.DBNull.System.IConvertible.ToDecimal(IFormatProvider provider) at System.Convert.ToDecimal(Object value) at SilSolver.WEB.Printing.PFDetails.load_action_At_DataTable(IEnumerable`1 ptProtFuncs, PSF_ProtectiveFunctionComments psf, DataTable DT_ProtectiveFunction, String _Inputs, Decimal& OverAllPFDPercent, Decimal& OverAllSTRPercent) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\PFDetails.cs:line 594 at SilSolver.WEB.Printing.PFDetails.PrintProject(Int32 _ProtectiveFunction_FK) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\PFDetails.cs:line 343 at SilSolver.WEB.Printing.ProjectMainPrinting.Get_HTML_PFDetails(Int32 _ProtectiveFunction_FK) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Printing\ProjectMainPrinting.cs:line 552 2023-01-18 14:36:32.1160 Edit button clicked. 2023-01-18 15:12:10.8544 Cannot insert duplicate key row in object 'dbo.PT_ProtectiveFunction' with unique index 'idx_UniquePTProtective'. The duplicate key value is (40129, A1O3, D11 ). Cannot insert the value NULL into column 'ProtectiveFunctionID_FK', table 'SilSolverV.dbo.PM_ProtectiveFunction'; column does not allow nulls. INSERT fails. The statement has been terminated. The statement has been terminated. System.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.PT_ProtectiveFunction' with unique index 'idx_UniquePTProtective'. The duplicate key value is (40129, A1O3, D11 ). Cannot insert the value NULL into column 'ProtectiveFunctionID_FK', table 'SilSolverV.dbo.PM_ProtectiveFunction'; column does not allow nulls. INSERT fails. The statement has been terminated. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at SilSolver.DAL.DbProviderHelper.FillDataTable(DbDataAdapter dbDataAdapter) ClientConnectionId:4ea42020-4d04-46e5-afda-c0f9ea447fb3 Error Number:2601,State:1,Class:14 2023-01-18 15:12:10.8856 Cannot insert duplicate key row in object 'dbo.PT_ProtectiveFunction' with unique index 'idx_UniquePTProtective'. The duplicate key value is (40129, A1O3, D11 ). Cannot insert the value NULL into column 'ProtectiveFunctionID_FK', table 'SilSolverV.dbo.PM_ProtectiveFunction'; column does not allow nulls. INSERT fails. The statement has been terminated. The statement has been terminated. System.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.PT_ProtectiveFunction' with unique index 'idx_UniquePTProtective'. The duplicate key value is (40129, A1O3, D11 ). Cannot insert the value NULL into column 'ProtectiveFunctionID_FK', table 'SilSolverV.dbo.PM_ProtectiveFunction'; column does not allow nulls. INSERT fails. The statement has been terminated. The statement has been terminated. at SilSolver.DAL.DbProviderHelper.FillDataTable(DbDataAdapter dbDataAdapter) at SilSolver.DAL.PT_ProtectiveFunctionService.AddPT_ProtectiveFunctionForPasteData(String Source, Int32 PrimaryId, String input, String ConfigType, String functionid, Int32 Pid, String deviceposition, Int32 PM_Id, Int32 userid) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Services121\PT_ProtectiveFunctionService.cs:line 648 ClientConnectionId:4ea42020-4d04-46e5-afda-c0f9ea447fb3 Error Number:2601,State:1,Class:14 2023-01-18 15:12:10.9169 Cannot insert duplicate key row in object 'dbo.PT_ProtectiveFunction' with unique index 'idx_UniquePTProtective'. The duplicate key value is (40129, A1O3, D11 ). Cannot insert the value NULL into column 'ProtectiveFunctionID_FK', table 'SilSolverV.dbo.PM_ProtectiveFunction'; column does not allow nulls. INSERT fails. The statement has been terminated. The statement has been terminated. System.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.PT_ProtectiveFunction' with unique index 'idx_UniquePTProtective'. The duplicate key value is (40129, A1O3, D11 ). Cannot insert the value NULL into column 'ProtectiveFunctionID_FK', table 'SilSolverV.dbo.PM_ProtectiveFunction'; column does not allow nulls. INSERT fails. The statement has been terminated. The statement has been terminated. at SilSolver.DAL.PT_ProtectiveFunctionService.AddPT_ProtectiveFunctionForPasteData(String Source, Int32 PrimaryId, String input, String ConfigType, String functionid, Int32 Pid, String deviceposition, Int32 PM_Id, Int32 userid) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\Services121\PT_ProtectiveFunctionService.cs:line 653 at SilSolver.WEB.ProtectiveFunctionHTML.BindPasteSaveDevice(String Source, Int32 PrimaryId, String input, String ConfigType, String functionid, Int32 Pid, String deviceposition, Int32 DataSheetId) in C:\Users\hunter\source\repos\SIL-Solver\SIL Solver Enterprise\Silsolver\SourceCode\SilSolver.WEB\SilSolver.WEB\ProtectiveFunctionHTML.aspx.cs:line 1304 ClientConnectionId:4ea42020-4d04-46e5-afda-c0f9ea447fb3 Error Number:2601,State:1,Class:14