/// <summary> /// 审核打款 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool ApprovalPaymentRefundsMoney(RefundsMoneyInfo_Payment model) { if (model == null) { return(false); } const string SQL = @"Update RefundsMoney Set Fees=@Fees,AccountID=@AccountID,TransactionNumber=@TransactionNumber,RejectReason=@RejectReason, Status=@Status,ModifyTime=@ModifyTime,ModifyUser=@ModifyUser where ID=@ID"; using (SqlConnection conn = Databases.GetSqlConnection(GlobalConfig.ERP_DB_NAME, false)) { int result = conn.Execute(SQL, new { ID = model.ID, Fees = model.Fees, AccountID = model.AccountID, TransactionNumber = model.TransactionNumber, RejectReason = model.RejectReason, Status = model.IsPayment ? (int)RefundsMoneyStatusEnum.HadPayment : (int)RefundsMoneyStatusEnum.Rejected, ModifyTime = DateTime.Now, ModifyUser = model.ModifyUser, }); return(result > 0); } }
public void TestMethod_ApprovalPayment() { Init(); var model = new RefundsMoneyInfo_Payment() { ID = Guid.Parse("05852844-E829-4443-B354-0635076CA98D"), AccountID = Guid.Parse("7175FA90-1214-46E7-8D15-F9053E16928C"), Fees = 3.33m, TransactionNumber = "这是交易号", IsPayment = true, ModifyUser = "******", RejectReason = "通过2" }; var result = _refundsMoneyDal.ApprovalPaymentRefundsMoney(model); Assert.IsNotNull(result); }
/// <summary> /// 提交打款 /// </summary> private bool SaveData(bool IsPayment) { RefundsMoneyInfo_Payment model = new RefundsMoneyInfo_Payment() { ID = ApplyId, AccountID = RCB_AccountID.SelectedValue.StrToGuid(), Fees = txt_Fees.Text.StrToDecimal(), TransactionNumber = txt_TransactionNumber.Text, RejectReason = txt_RejectReason.Text, IsPayment = IsPayment, ModifyUser = Personnel.RealName, }; bool result = _refundsMoneySerivce.ApprovalPaymentRefundsMoney(model); return(result); }
public bool ApprovalPaymentRefundsMoney(RefundsMoneyInfo_Payment model) { return(_refundsMoneyDal.ApprovalPaymentRefundsMoney(model)); }