// clsResults.cs
// Copyright (C) 2008 Karel Jordaan karel_jordaan@yahoo.com.au
// 
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

using System.Collections;
using System.Windows.Forms;
using ZANZILib.Protocols.ItemCharacteristic;
using ZANZILib.Protocols.ResultOne;

namespace ZANZI.Test
{
    /// <summary>
    /// testclass to return a arry of result objects.
    /// </summary>
    public class clsTest
    {
        #region Variable declaration

        #endregion

        #region Structures

        #endregion

        #region Functions

        public ArrayList GetResultPaneTestData()
        {
            //Testcode results
            ArrayList al = new ArrayList();

            clsZanziProtResultOne retval = new clsZanziProtResultOne("None",
                                                                     "myprodname", "Branch One", "USD", 1234, 1, 44,
                                                                     "Karel Jordaan", "My City", "My Address", 222222,
                                                                     33333, 444444, "Business Name", 55555);


            clsZanziProtResultOne retval2 = new clsZanziProtResultOne("My Alias",
                                                                      "This Prod Name", "Branch Two", "CAD", 01234, 9,
                                                                      841, "My Name", "new", "adress1", 0222222, 133333,
                                                                      7444444, "Company Name", 15555);


            al.Add(retval);
            al.Add(retval2);

            //	DataTable dt = new DataTable();
            //dt.Rows.Add(retval.to);
            //dt.Rows.Add(retval2);
            //dt.


            return al;
        }


        public clsZanziProtResultOne GetSingleResultOneTestData()
        {
            return new clsZanziProtResultOne("No Result",
                                             "ProductName", "Somewhere", "ZAR", 1234, 1, 44, "Karel Jordaan",
                                             "Cape Town", "Address", 222222, 33333, 444444, "ACME", 55555);
        }


        public void GetCharacteristicsTestData(ListView lst)
        {
            clsZanziProtItemCharacteristic clsChar = new clsZanziProtItemCharacteristic("somename", "somevalue");


            ListViewItem lstitm = new ListViewItem();
            lstitm.Text = clsChar.CharName;
            lstitm.SubItems.Add(clsChar.CharValue);
            lst.Items.Add(lstitm);
        }


        public long GetCurrentSelectedRecordGUI()
        {
            return 1111;
        }

        #endregion

        #region Menu handlers

        #endregion

        #region Custom Windows Form Designer generated code

        #endregion

        #region Events

        #endregion
    }
}