示例#1
0
        public override void Run()
        {
            ItemReceiptForm2       form       = new ItemReceiptForm2();
            IItemReceiptRepository receiptDao = new NHibernateItemReceiptRepository();
            IVendorRepository      vendorDao  = new NHibernateVendorRepository();

            form.VendorsList             += delegate { form.Vendors = vendorDao.FindActive(); };
            form.ItemReceiptSaveAndClose += delegate(object sender, ItemReceiptEventArgs e) {
                receiptDao.SaveOrUpdate(e.ItemReceipt);
                form.Close();
            };
            WorkbenchSingleton.AddChild(form);
        }
示例#2
0
        public override void Run()
        {
            var form = new ItemReceiptForm2(receipt);

            WorkbenchSingleton.AddChild(form);
        }