コード例 #1
0
        public JsonResult Approve(ApprovePaymentModel input)
        {
            input.userId     = RDAuthorize.UserId;
            input.branchCode = RDAuthorize.BranchCode;
            var result = new ResultModel();

            result = _paymentservice.approveRepayment(input);
            return(Json(result));
        }
コード例 #2
0
ファイル: PaymentService.cs プロジェクト: anh120991/template
        ////// <summary>
        ///Duyệt thông tin thu phí BH
        /// dutp
        /// 22/7/20
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        ///
        public ResultModel approveRepayment(ApprovePaymentModel input)
        {
            try
            {
                SqlParameter[] prms = new SqlParameter[]
                {
                    new SqlParameter {
                        ParameterName = "repaymentId", DbType = DbType.Int64, Value = input.repaymentId, Size = Int32.MaxValue
                    },
                    new SqlParameter {
                        ParameterName = "approveStatus", DbType = DbType.String, Value = input.approveStatus == null ? (object)DBNull.Value : input.approveStatus, Size = Int32.MaxValue
                    },
                    new SqlParameter {
                        ParameterName = "approveContent", DbType = DbType.String, Value = input.approveContent == null ? (object)DBNull.Value : input.approveContent, Size = Int32.MaxValue
                    },
                    new SqlParameter {
                        ParameterName = "userId", DbType = DbType.String, Value = input.userId == null ? (object)DBNull.Value : input.userId, Size = Int32.MaxValue
                    },
                    new SqlParameter {
                        ParameterName = "branchCode", DbType = DbType.String, Value = input.branchCode == null ? (object)DBNull.Value : input.branchCode, Size = Int32.MaxValue
                    },


                    new SqlParameter {
                        ParameterName = "resultMessage", DbType = DbType.String, Direction = ParameterDirection.Output, Size = Int32.MaxValue
                    },
                    new SqlParameter {
                        ParameterName = "resultCode", DbType = DbType.Int32, Direction = ParameterDirection.Output, Size = Int32.MaxValue
                    }
                };
                var result       = _Repository.ExecWithStoreProcedureCommand(Store_approveRepayment, prms);
                var resultObject = JsonConvert.DeserializeObject <ResultModel>(result.errorMessage);
                return(resultObject);
            }
            catch (Exception ex)
            {
                HDBH.Log.WriteLog.Error("PaymentService => approveRepayment", ex);
                return(new ResultModel());
            }
        }