コード例 #1
0
        public bool Add(RemittanceInfo remittanceInfo)
        {
            Parameters cmdParams = new Parameters();

            cmdParams.AddInParameter("@OrderID", DbType.Int32, remittanceInfo.OrderId);
            cmdParams.AddInParameter("@Money", DbType.Decimal, remittanceInfo.Money);
            return(DBHelper.ExecuteProc("PR_Shop_Remittance_Add", cmdParams));
        }
コード例 #2
0
        public RemittanceInfo GetByOrderId(int orderId)
        {
            Parameters cmdParams = new Parameters();

            cmdParams.AddInParameter("OrderId", DbType.Int32, orderId);
            using (NullableDataReader reader = new NullableDataReader(DBHelper.ExecuteReaderProc("PR_Shop_Remittance_GetByOrderId", cmdParams)))
            {
                if (reader.Read())
                {
                    RemittanceInfo info = new RemittanceInfo();
                    info.OrderId      = reader.GetInt32("OrderID");
                    info.ClientId     = reader.GetInt32("ClientID");
                    info.UserName     = reader.GetString("UserName");
                    info.OrderNum     = reader.GetString("OrderNum");
                    info.ClientName   = reader.GetString("ClientName");
                    info.MoneyTotal   = reader.GetDecimal("MoneyTotal");
                    info.MoneyReceipt = reader.GetDecimal("MoneyReceipt");
                    info.Email        = reader.GetString("Email");
                    return(info);
                }
                return(new RemittanceInfo(true));
            }
        }
コード例 #3
0
 public static bool Add(RemittanceInfo remittanceInfo)
 {
     return(dal.Add(remittanceInfo));
 }