This commit is contained in:
Roland Drabesch
2022-06-23 10:20:26 +02:00
parent d66a53a63a
commit 8e49e3b42f
4 changed files with 20 additions and 6 deletions
@@ -1 +1 @@
d6acafee485301268608cd081e3b8b166497c098
5ed75d99ee45ff67821090f1b3dbb001dd9e4fe3
@@ -9,7 +9,7 @@ using System.Reflection;
namespace Service.MeterProcessState.Areas.HelpPage
{
/// <summary>
/// This class will create an object of a given type and populate it with sample data.
/// This class will create an object of a given type and populate it with sample data. force push
/// </summary>
public class ObjectGenerator
{
@@ -382,9 +382,22 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
}
});
}
/// <summary>
///
/// </summary>
/// <param name="PUserId"></param>
/// <param name="PFileName"></param>
/// <param name="PValidDate"></param>
/// <param name="PBuilderOperatorName"></param>
/// <returns></returns>
[Route("PostFWUpdateSafeOdd"), HttpPost]
public async Task<HttpResponseMessage> PostFWUpdateSafeOdd(int PUserId, string PFileName, DateTime PValidDate, string PBuilderOperatorName = "none")
public async Task<HttpResponseMessage> PostFWUpdateSafeOdd(int PUserId, string PFileName, DateTime PValidDate, string PBuilderOperatorName = "none")
{
if (PFileName.Length > 150)
{
throw new ApplicationException("File name is to long");
}
var inpStrem = HttpContext.Current.Request.GetBufferlessInputStream(true);
var inpHeaders = Request.Content.Headers;
return await Task.Run(async () =>
@@ -397,7 +410,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
using (var dataacces = new SqlDataAccess(GlobalConfig.connectionString.Value))
{
var parameters = new List<System.Data.SqlClient.SqlParameter>();
var FileName = new System.Data.SqlClient.SqlParameter("@FileName", SqlDbType.NVarChar, 50);
var FileName = new System.Data.SqlClient.SqlParameter("@FileName", SqlDbType.NVarChar, 150);
var UserId = new System.Data.SqlClient.SqlParameter("@UserId", SqlDbType.Int);
var ValidDate = new System.Data.SqlClient.SqlParameter("@ValidDate", SqlDbType.Date);
@@ -411,7 +424,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
var sb = new StringBuilder();
sb.AppendLine($" Declare @FileID as int ");
sb.AppendLine($" Declare @FileName as NVarChar(50) ");
sb.AppendLine($" Declare @FileName as NVarChar(150) ");
sb.AppendLine($" Declare @UserId as int ");
sb.AppendLine($" set @FileName = '{PFileName}' ");
sb.AppendLine($" set @UserId = {PUserId} ");
@@ -602,7 +615,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
{
var parameters = new List<System.Data.SqlClient.SqlParameter>();
var DbFileContent = new System.Data.SqlClient.SqlParameter("@FileContent", SqlDbType.VarBinary);
var DbFileName = new System.Data.SqlClient.SqlParameter("@FileName", SqlDbType.NVarChar, 50);
var DbFileName = new System.Data.SqlClient.SqlParameter("@FileName", SqlDbType.NVarChar,150 );
@@ -2,6 +2,7 @@
namespace Service.MeterProcessState.Models
{
// force push
// Models used as parameters to AccountController actions.
public class AddExternalLoginBindingModel