// // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // .NET StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications using System; using System.Collections; using Trade.StockTraderWebApplicationSettings; namespace Trade.StockTraderWebApplicationModelClasses { /// /// Model class for displaying order data in a web page. /// public sealed class OrderDataUI { private int _orderID; private string _orderType; private string _orderStatus; private DateTime _openDate; private string _completionDate; private double _quantity; private decimal _price; private decimal _orderFee; private string _symbol; public OrderDataUI() { } public OrderDataUI(int orderID, string orderType, string orderStatus, DateTime openDate, string completionDate, double quantity, decimal price, decimal orderFee, string symbol) { this._orderID = orderID; this._orderType = orderType; this._orderStatus = orderStatus; this._openDate = openDate; this._completionDate = completionDate; this._quantity = quantity; this._price = price; this._orderFee = orderFee; this._symbol = symbol; } public int orderID { get { return _orderID; } } public string orderType { get { return _orderType; } } public string orderStatus { get { return _orderStatus; } } public DateTime openDate { get { return _openDate; } } public string completionDate { get { return _completionDate; } } public double quantity { get { return _quantity; } } public decimal price { get { return _price; } } public decimal orderFee { get { return _orderFee; } } public decimal total { get { return Convert.ToDecimal(this._quantity)*this._price + this._orderFee; } } public string symbol { get { return _symbol; } } public string quoteLink { get { return "" + _symbol + ""; } } } }