public PayOrderBag(pay_order payOrder, AccountBag payer, AccountBag receiver, PayOrderTypeEnum payOrderType, PaymentTypeEnum paymentType, int payNum) { Payer = payer; Receiver = receiver; PayOrder = payOrder; //payer.Expense(payNum); //receiver.Charge(payNum); //PayOrder = new pay_order //{ // PO_ID = PO_ID, // PayerAccID = payer.Account.AccountID, // ReceiverAccID = receiver.Account.AccountID, // CreateTime = DateTime.Now, // PayNum = payNum, // PayOrderTypeID = payOrderType.ToString(), // PaymentTypeID = paymentType.ToString(), // PayStateID = PayStateEnum.Created.ToString() //}; }
public PayOrderBag(AccountBag payer, AccountBag receiver, PayOrderTypeEnum payOrderType, PaymentTypeEnum paymentType, double payNum) { //取2位有效数字 var money = (int)(payNum * 100); Payer = payer; Receiver = receiver; //payer.Expense(payNum); //receiver.Charge(payNum); PayOrder = new pay_order { PO_ID = //DateTime.Now.FormatTime(false)+"-"+ DateTime.Now.Random(), PayerAccID = payer.Account.AccountID, ReceiverAccID = receiver.Account.AccountID, CreateTime = DateTime.Now, PayNum = money, PayOrderTypeID = payOrderType.ToString(), PaymentTypeID = paymentType.ToString(), PayStateID = PayStateEnum.Created.ToString() }; }