示例#1
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     var account = Code.AccountManage.Instance.GetAccount(TextBox1.Text, accountType, transactionType);
     decimal amount=Convert.ToInt32(TextBox2.Text);
     int op = Convert.ToInt32(drpOperate.SelectedValue);
     //创建交易流水
     var ts = new CRL.Account.ITransaction() { AccountId = account.Id, Amount = amount, OperateType = (CRL.Account.OperateType)op, TradeType = op, Remark = "业务交易:" + amount };
     ts.OutOrderId = DateTime.Now.ToShortTimeString();//外部订单号,会用来判断有没有重复提交
     string error;
     //提交交易
     bool a = Code.TransactionManage.Instance.SubmitTransaction(out error, ts);
     Response.Write("操作" + a + " " + error);
     Bind();
 }
        protected void Button2_Click(object sender, EventArgs e)
        {
            var     account = Code.AccountManage.Instance.GetAccount(TextBox1.Text, accountType, transactionType);
            decimal amount  = Convert.ToInt32(TextBox2.Text);
            int     op      = Convert.ToInt32(drpOperate.SelectedValue);
            //创建交易流水
            var ts = new CRL.Account.ITransaction()
            {
                AccountId = account.Id, Amount = amount, OperateType = (CRL.Account.OperateType)op, TradeType = op, Remark = "业务交易:" + amount
            };

            ts.OutOrderId = DateTime.Now.ToShortTimeString();//外部订单号,会用来判断有没有重复提交
            string error;
            //提交交易
            bool a = Code.TransactionManage.Instance.SubmitTransaction(out error, ts);

            Response.Write("操作" + a + " " + error);
            Bind();
        }