c#之tcbs struct(2)小記

wisdomone1發表於2011-08-30
public struct DeductSchedViewItem //結構體加上public
    {
        //private long _deductSchedNbr;
        private string _deductSchedNbr; //結構體成員private
        private long _submitOrgNbr;
        private long _clearingAcctNbr;
        private long _importApplNbr;
        private string _deductSchedTypCd;
        private string _deductSchedTypDesc;
       
        private string _submitOrgName;
        private string _contractBankName;
      
        private DateTime _contractDate;
        private DateTime _dueDate;
        public string DeductSchedNbr //結構體的屬性訪問器
        {
            get
            {
                return this._deductSchedNbr;
            }
            set
            {
                this._deductSchedNbr = value;
            }
        }
        //public long DeductSchedNbr
        //{
        //    get
        //    {
        //        return this._deductSchedNbr;
        //    }
        //    set
        //    {
        //        this._deductSchedNbr = value;
        //    }
        //}
        public long SubmitOrgNbr
        {
            get
            {
                return this._submitOrgNbr;
            }
            set
            {
                this._submitOrgNbr = value;
            }
        }
       
        private long _contractAcctNbr;
        public long ContractAcctNbr
        {
            get
            {
                return this._contractAcctNbr;
            }
            set
            {
                this._contractAcctNbr = value;
            }
        }
        //增加簽約賬號bbp2011-04-16--end
        public long ClearingAcctNbr
        {
            get
            {
                return this._clearingAcctNbr;
            }
            set
            {
                this._clearingAcctNbr = value;
            }
        }
        public long ImportApplNbr
        {
            get
            {
                return this._importApplNbr;
            }
            set
            {
                this._importApplNbr = value;
            }
        }
        public string DeductSchedTypCd
        {
            get
            {
                return this._deductSchedTypCd;
            }
            set
            {
                this._deductSchedTypCd = value;
            }
        }
        public string DeductSchedTypDesc
        {
            get
            {
                return this._deductSchedTypDesc;
            }
            set
            {
                this._deductSchedTypDesc = value;
            }
        }
     
        public DateTime? ContractDate
        {
            get
            {
                if (this._contractDate == DateTime.MinValue) //屬性訪問器新增if判斷
                {
                    return null;
                }
                return new DateTime?(this._contractDate);//結構體中的return
            }
            set
            {
                DateTime? CSS0S0000 = value;
                this._contractDate = CSS0S0000.HasValue ? CSS0S0000.GetValueOrDefault() : DateTime.MinValue;
            }
        }

     
        public DateTime? DueDate
        {
            get
            {
                if (this._dueDate == DateTime.MinValue)
                {
                    return null;
                }
                return new DateTime?(this._dueDate);
            }
            set
            {
                DateTime? CSS0S0000 = value;
                this._dueDate = CSS0S0000.HasValue ? CSS0S0000.GetValueOrDefault() : DateTime.MinValue;
            }
        }
       
        public string SubmitOrgName
        {
            get
            {
                return this._submitOrgName;
            }
            set
            {
                this._submitOrgName = value;
            }
        }
        public string ContractBankName
        {
            get
            {
                return this._contractBankName;
            }
            set
            {
                this._contractBankName = value;
            }
        }
    }
}

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-706271/,如需轉載,請註明出處,否則將追究法律責任。

相關文章