//--------------------------------------------------------------------- // 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); } }
//--------------------------------------------------------------------- // 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; }