public async Task <APIResult> InsertCustomizedImpItem(CustomizedImpItemDto param) { try { string spName = @"up_RMMT_TOU_AddCustomImpItem_C"; DynamicParameters dp = new DynamicParameters(); dp.Add("@PId", param.PId, DbType.Int64); dp.Add("@ImpTitle", param.ImpTitle, DbType.String); dp.Add("@ImpDesc", param.ImpDesc, DbType.String); dp.Add("@PlanApproalYN", param.PlanApproalYN, DbType.Boolean); dp.Add("@PlanFinishDate", param.PlanFinishDate, DbType.DateTime); dp.Add("@ResultApproalYN", param.ResultApproalYN, DbType.Boolean); dp.Add("@ResultFinishDate", param.ResultFinishDate, DbType.DateTime); dp.Add("@Remark", param.Remark, DbType.String); dp.Add("@InUserId", param.InUserId, DbType.Int64); dp.Add("@TCKind", param.TCKind, DbType.String); using (var conn = new SqlConnection(DapperContext.Current.SqlConnection)) { conn.Open(); using (var tran = conn.BeginTransaction(System.Data.IsolationLevel.ReadCommitted)) { await conn.ExecuteAsync(spName, dp, tran, null, CommandType.StoredProcedure); tran.Commit(); } } return(new APIResult { Body = "", ResultCode = ResultType.Success, Msg = "" }); } catch (Exception ex) { return(new APIResult { Body = "", ResultCode = ResultType.Failure, Msg = ex.Message }); } }
public Task <APIResult> InsertCustomizedImpItem([FromBody] CustomizedImpItemDto param) { return(_tourService.InsertCustomizedImpItem(param)); }