/// <summary> /// 审核 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool ApprovalRefundsMoney(RefundsMoneyInfo_Approval model) { if (model == null) { return(false); } const string SQL = @"Update RefundsMoney Set BankName=@BankName,BankAccountNo=@BankAccountNo,UserName=@UserName,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, BankName = model.BankName, BankAccountNo = model.BankAccountNo, UserName = model.UserName, RejectReason = model.RejectReason, Status = model.IsApproved ? (int)RefundsMoneyStatusEnum.PendingPayment : (int)RefundsMoneyStatusEnum.Rejected, ModifyTime = DateTime.Now, ModifyUser = model.ModifyUser, }); return(result > 0); } }
public void TestMethod_Approval() { Init(); var model = new RefundsMoneyInfo_Approval() { ID = Guid.Parse("05852844-E829-4443-B354-0635076CA98D"), BankAccountNo = "11", BankName = "22", UserName = "******", ModifyUser = "******", IsApproved = true, RejectReason = "通过" }; var result = _refundsMoneyDal.ApprovalRefundsMoney(model); Assert.IsNotNull(result); }