WF4.0實戰(二):超市收銀軟體

來源:互聯網
上載者:User

今天翻到了伍迷前輩的大話設計模式中的《第二章 商場促銷-策略模式》。我感覺用WF去實現,比較簡單直觀,我很喜歡做簡單的事情 。故使用了伍迷前輩書中的兩個主要人物小菜和大鳥,寫下這篇部落格。

時間:4月16日        地點:大鳥的房間    人物:大鳥、小菜

大鳥給小菜出了一個題目,做一個收銀軟體。小菜用WF4不到二十分鐘寫出了第一個版本,功能也非常的簡單,如下:

定義一個ProductItem類和Order類,如下:

1   public class ProductItem
2     {
3       public   decimal ProductPrice
4        {
5           get;
6           set;
7       }
8       public int  ProductNumber
9       {
10           get;
11           set;
12       }
13       public string ProductName
14       {
15           get;
16            set;
17       }
18 
19     }
20 
21   public class Order
22   {
23        public Order()
24       {
25           ProductList = new List<ProductItem> ();
26        }
27       public List<ProductItem> ProductList
28       {
29            get;
30           set;
31       }
32   }

設定處理流程:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.