initial add
This commit is contained in:
40
Fab2ApprovalSystem-Copy/DMO/ECNTypeChangeLogDMO.cs
Normal file
40
Fab2ApprovalSystem-Copy/DMO/ECNTypeChangeLogDMO.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using Fab2ApprovalSystem.Models;
|
||||
using Dapper;
|
||||
using System.Configuration;
|
||||
|
||||
namespace Fab2ApprovalSystem.DMO
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class ECNTypeChangeLogDMO
|
||||
{
|
||||
private static IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["FabApprovalConnection"].ConnectionString);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="changeLog"></param>
|
||||
public static void Add(ECNTypeChangeLog changeLog)
|
||||
{
|
||||
|
||||
var parameters = new DynamicParameters();
|
||||
parameters.Add("@ECNNumber", changeLog.ECNNumber);
|
||||
parameters.Add("@UserID", changeLog.UserID);
|
||||
parameters.Add("@ECNTypeFrom", changeLog.ECNTypeFrom);
|
||||
parameters.Add("@ECNTypeTo", changeLog.ECNTypeTo);
|
||||
|
||||
db.Execute("ECNInsertECNTypeChangeLog", parameters, commandType: CommandType.StoredProcedure);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user