Example #1
0
        public SeatingChart PreSeatingChart()
        {
            SeatingChart result;

            if (this._ListSeatingChart.Count <= 0)
            {
                result = null;
            }
            else
            {
                this._nIndexPos--;
                if (this._nIndexPos < 0)
                {
                    this._nIndexPos = 0;
                }
                if (this._nIndexPos >= this._ListSeatingChart.Count)
                {
                    this._nIndexPos = this._ListSeatingChart.Count - 1;
                }
                this._CurrentSeatingChart = this._ListSeatingChart[this._nIndexPos];
                if (this.IsMinObj())
                {
                    this.bhDirectionButton_L.IsMinOrMax = true;
                }
                else
                {
                    this.bhDirectionButton_L.IsMinOrMax = false;
                }
                if (this.IsMaxObj())
                {
                    this.bhDirectionButton_R.IsMinOrMax = true;
                }
                else
                {
                    this.bhDirectionButton_R.IsMinOrMax = false;
                }
                result = this._CurrentSeatingChart;
            }
            return(result);
        }
Example #2
0
 public void InitData(SeatingChart currentSeatingChart, List <SeatingChart> listSeatingChart)
 {
     this._CurrentSeatingChart = currentSeatingChart;
     this._ListSeatingChart    = listSeatingChart;
     this._nIndexPos           = 0;
     if (this.IsMinObj())
     {
         this.bhDirectionButton_L.IsMinOrMax = true;
     }
     else
     {
         this.bhDirectionButton_L.IsMinOrMax = false;
     }
     if (this.IsMaxObj())
     {
         this.bhDirectionButton_R.IsMinOrMax = true;
     }
     else
     {
         this.bhDirectionButton_R.IsMinOrMax = false;
     }
 }