熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

ASP.NET項目開發指南:網絡書店訂單的發貨和作廢(2)

2013-11-13 12:24:27  來源: .NET編程 

    訂單的發貨和作廢(

  【代碼說明】代碼中第行先接收上個頁面傳來的值代碼第行以這個值為參數調用ST_Order類的GetorderByID()方法該方法返回一個ST_OrderEntity類的實例用來記錄收貨人的相關信息

  說明捕獲異常後並沒有輸出任何錯誤信息而是直接return

  ST_OrderEntity實體的主要代碼如程序所示

  程序  ST_OrderEntitycs

    public struct ST_OrderEntity

    {

        private int _ST_OrderID;

        private int _ST_UserID;

        private DateTime _ST_CreateTime;

        private string _ST_Ship;

        private string _ST_Payment;

        private float _ST_Sum;

        private string _ST_Desciption;

        private short _ST_Status;

        private string _ST_Consignee;

        private string _ST_ConsingeeEmail;

        private string _ST_ConsingeePhone;

        private string _ST_ConsingeeAddress;

        private string _ST_ConsingeePostcode;

        private string _ST_ConsingeeGender;

        ///訂單ID

        public int ST_OrderID

        {

            get

            {

                return this_ST_OrderID;

            }

            set

            {

                this_ST_OrderID = value;

            }

        }

        ///消費者ID

        public int ST_UserID

        {

            get

            {

                return this_ST_UserID;

            }

            set

            {

                this_ST_UserID = value;

            }

        }

        ///訂單生成時間

        public DateTime ST_CreateTime

        {

            get

            {

                return this_ST_CreateTime;

            }

            set

            {

                this_ST_CreateTime = value;

            }

        }

        ///配送方式包括送貨上門平郵EMS

        public string ST_Ship

        {

            get

            {

                return this_ST_Ship;

            }

            set

            {

                this_ST_Ship = value;

            }

        }

        ///支付方式包括銀行電匯郵局匯款貨到付款

        public string ST_Payment

        {

            get

            {

                return this_ST_Payment;

            }

            set

            {

                this_ST_Payment = value;

            }

        }

        ///訂單金額

        public float ST_Sum

        {

            get

            {

                return this_ST_Sum;

            }

            set

            {

                this_ST_Sum = value;

            }

        }

        ///訂單說明

        public string ST_Desciption

        {

            get

            {

                return this_ST_Desciption;

            }

            set

            {

                this_ST_Desciption = value;

            }

       }

       ///訂單狀態是新訂單是發貨是作廢

       public short ST_Status

       {

           get

           {

               return this_ST_Status;

           }

           set

           {

               this_ST_Status = value;

           }

       }

       ///訂單收貨人

       public string ST_Consignee

       {

           get

           {

               return this_ST_Consignee;

           }

           set

           {

               this_ST_Consignee = value;

           }

       }

       ///訂單收貨人Email

       public string ST_ConsingeeEmail

       {

           get

           {

               return this_ST_ConsingeeEmail;

           }

           set

           {

               this_ST_ConsingeeEmail = value;

           }

       }

       ///訂單收貨人電話

       public string ST_ConsingeePhone

       {

           get

           {

               return this_ST_ConsingeePhone;

           }

           set

           {

               this_ST_ConsingeePhone = value;

           }

       }

       ///訂單收貨人地址

       public string ST_ConsingeeAddress

       {

           get

           {

               return this_ST_ConsingeeAddress;

           }

           set

           {

               this_ST_ConsingeeAddress = value;

           }

       }

       ///訂單收貨人郵編

       public string ST_ConsingeePostcode

       {

           get

           {

               return this_ST_ConsingeePostcode;

           }

           set

           {

               this_ST_ConsingeePostcode = value;

           }

       }

       ///訂單收貨人性別

       public string ST_ConsingeeGender

       {

           get

           {

               return this_ST_ConsingeeGender;

           }

           set

           {

               this_ST_ConsingeeGender = value;

           }

       }

       返回目錄ASPNET項目開發指南

       編輯推薦

       ASPNET MVC 框架揭秘

       ASPNET開發寶典

       ASP NET開發培訓視頻教程


From:http://tw.wingwit.com/Article/program/net/201311/15846.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.