public string AddOffLinePaymentInfo(System.Web.HttpContext context)
        {
            this.username    = context.Request["username"];
            this.payAmount   = decimal.Parse(context.Request["coin"]);
            this.orderID     = context.Request["orderid"];
            this.applyDate   = DateTime.Parse(context.Request["P_Time"]);
            this.paymentType = int.Parse(context.Request["PaymentType"]);;
            this.bankName    = "BankName";



            //  ShareDetialInfo shareDetialInfo = new ShareDetialInfo();
            OffLinePayOrders OffLinePayOrdersInfo = new OffLinePayOrders();

            OffLinePayOrdersInfo.Accounts    = this.username;
            OffLinePayOrdersInfo.OrderID     = this.orderID;
            OffLinePayOrdersInfo.PayAmount   = this.payAmount;
            OffLinePayOrdersInfo.ApplyDate   = this.applyDate;
            OffLinePayOrdersInfo.PaymentType = this.paymentType;
            OffLinePayOrdersInfo.BankName    = this.bankName;

            context.Response.ContentType = "text/plain";
            //context.Response.Write("OffLinePayOrdersInfo.Accounts: " + OffLinePayOrdersInfo.Accounts + "\r\n");
            //context.Response.Write("OffLinePayOrdersInfo.PayAmount: " + OffLinePayOrdersInfo.PayAmount + "\r\n");
            //context.Response.Write("OffLinePayOrdersInfo.OrderID: " + OffLinePayOrdersInfo.OrderID + "\r\n");
            //context.Response.Write("OffLinePayOrdersInfo.ApplyDate: " + OffLinePayOrdersInfo.ApplyDate + "\r\n");
            //context.Response.Write("OffLinePayOrdersInfo.PaymentType: " + OffLinePayOrdersInfo.PaymentType + "\r\n");

            //  shareDetialInfo.ShareID = 100;
            TreasureFacade treasureFacade = new TreasureFacade();

            treasureFacade.WriteOffLinePayment(OffLinePayOrdersInfo);

            return("1");
        }
Exemple #2
0
        public void WriteOffLinePayment(OffLinePayOrders OffLinePayOrdersInfo)
        {
            System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
            // stringBuilder.Append("INSERT INTO OffLinePayOrders(Accounts,OrderID,PayAmount,ApplyDate)");
            stringBuilder.Append("INSERT INTO OffLinePayOrders(Accounts,OrderID,PayAmount,PaymentType,BankName,ApplyDate)");
            stringBuilder.Append(" VALUES(");
            // stringBuilder.Append("@Accounts,@OrderID,@PayAmount,@ApplyDate)");
            stringBuilder.Append("@Accounts,@OrderID,@PayAmount,@PaymentType,@BankName,@ApplyDate)");
            System.Collections.Generic.List <System.Data.Common.DbParameter> list = new System.Collections.Generic.List <System.Data.Common.DbParameter>();
            list.Add(base.Database.MakeInParam("Accounts", OffLinePayOrdersInfo.Accounts));
            list.Add(base.Database.MakeInParam("OrderID", OffLinePayOrdersInfo.OrderID));
            list.Add(base.Database.MakeInParam("PayAmount", OffLinePayOrdersInfo.PayAmount));
            list.Add(base.Database.MakeInParam("ApplyDate", OffLinePayOrdersInfo.ApplyDate));
            list.Add(base.Database.MakeInParam("PaymentType", OffLinePayOrdersInfo.PaymentType));
            list.Add(base.Database.MakeInParam("BankName", OffLinePayOrdersInfo.BankName));


            base.Database.ExecuteNonQuery(System.Data.CommandType.Text, stringBuilder.ToString(), list.ToArray());
        }
Exemple #3
0
 public void WriteOffLinePayment(OffLinePayOrders OffLinePayOrdersInfo)
 {
     this.treasureData.WriteOffLinePayment(OffLinePayOrdersInfo);
 }