Exemplo n.º 1
0
 public RegularItem(int _Id, string _Name, REGULARS_PERIOD _Period, int _Amount)
 {
     this.Id     = _Id;
     this.Name   = _Name;
     this.Period = _Period;
     this.Amount = _Amount;
 }
Exemplo n.º 2
0
 private void InitializeRegularItem(int _Id, string _Name, int _Amount, REGULARS_PERIOD _Period)
 {
     this.Id     = _Id;
     this.Name   = _Name;
     this.Amount = DataConversion.ConvertCentsToCurrency(_Amount);
     InitializePeriod(_Period);
 }
Exemplo n.º 3
0
        private void SetPeriod(REGULARS_PERIOD _Period)
        {
            this.IsPerDay   = false;
            this.IsPerMonth = false;
            this.IsPerYear  = false;

            switch (_Period)
            {
            case REGULARS_PERIOD.DAYLY:
                this.IsPerDay = true;
                break;

            case REGULARS_PERIOD.MONTHLY:
                this.IsPerMonth = true;
                break;

            case REGULARS_PERIOD.YEARLY:
                this.IsPerYear = true;
                break;
            }
        }
Exemplo n.º 4
0
        private void InitializePeriod(REGULARS_PERIOD _Period)
        {
            m_Period = _Period;

            switch (_Period)
            {
            case REGULARS_PERIOD.DAYLY:
                this.PerPeriod      = "per day";
                this.PerPeriodIndex = "0";
                break;

            case REGULARS_PERIOD.MONTHLY:
                this.PerPeriod      = "per month";
                this.PerPeriodIndex = "1";
                break;

            case REGULARS_PERIOD.YEARLY:
                this.PerPeriod      = "per year";
                this.PerPeriodIndex = "2";
                break;
            }
        }
Exemplo n.º 5
0
 public RegularItemVM(int _Id, string _Name, int _Amount, REGULARS_PERIOD _Period)
 {
     InitializeRegularItem(_Id, _Name, _Amount, _Period);
 }