示例#1
0
 //---------------------------------------------------------------------
 // Displays the form in run mode with the given automaticlist
 //---------------------------------------------------------------------
 public CancelAutoForm(AutomaticList alist)
 {
     InitializeComponent();
     autoList = alist.getList();
     removal  = alist;
     AutoListBox.Items.Clear();
     List <Transaction> .Enumerator em = autoList.GetEnumerator();
     while (em.MoveNext())
     {
         AutoListBox.Items.Add(em.Current.getDate() + " " + em.Current.getPrice() + " " + em.Current.getDesc(), false);
     }
 }
示例#2
0
        //---------------------------------------------------------------------
        // Creates the form when running the program
        // params: (in CategoryList, in TransactionHistory, in int, in AutomaticList,
        // in Date, in User)
        //---------------------------------------------------------------------
        public TransactionForm(CategoryList categories, TransactionHistory inTransHistory, int inPrimaryKey, AutomaticList autolist, Date inDate, User inUser, Handler inCommandHandler)
        {
            primaryKey = inPrimaryKey;
            InitializeComponent(categories);
            transHistory = inTransHistory;

            for (int i = 0; i < categories.getLength(); i++)
            {
                CatePicker.Items.Add(categories.getCategory(i).getCategoryTitle());
            }

            AutoList       = autolist;
            Cate           = categories;
            currentUser    = inUser;
            currentDate    = inDate;
            commandHandler = inCommandHandler;
        }