Example #1
0
 public override void Run()
 {
     WorkbenchSingleton.AddChild(
         new ReportForm(new OpenPurchaseOrdersReport()),
         "Open Purchase Orders"
         );
 }
Example #2
0
 public override void Run()
 {
     WorkbenchSingleton.AddChild(
         new ReportForm(new OtherNamePhoneListReport()),
         "Other Names Phone List"
         );
 }
Example #3
0
 public override void Run()
 {
     WorkbenchSingleton.AddChild(
         new ReportForm(new CustomerBalanceDetailReport(), RepositoryFactory.GetDaoFactory().CreateCustomerDao().FindActiveDS()),
         "Customer Balance Detail"
         );
 }
Example #4
0
 public override void Run()
 {
     WorkbenchSingleton.AddChild(
         new ReportForm(new ARAgingSummaryReport(), RepositoryFactory.GetDaoFactory().CreateCustomerDao().FindActiveDS()),
         "A/R Aging Summary"
         );
 }
Example #5
0
        public override void Run()
        {
            WebBrowserForm form = new WebBrowserForm(Path.Combine(ApplicationUtility.DocDirectory, "home.html"));

            form.Navigated += delegate(object sender, WebBrowserNavigatedEventArgs e) {
                string fileName = Path.GetFileName(e.Url.ToString());
                switch (fileName)
                {
                case "home.html#EditCompany":
                    new EditCompany(CompanySingleton.Instance).Run();
                    break;

                case "home.html#ListItems":
                    new ListItems().Run();
                    break;

                case "home.html#ListVendors":
                    new ListVendors().Run();
                    break;

                case "home.html#ListCustomers":
                    new ListCustomers().Run();
                    break;

                case "home.html#AddPurchaseOrder":
                    new AddPurchaseOrder().Run();
                    break;

                default:
                    break;
                }
            };
            WorkbenchSingleton.AddChild(form, "Home Page");
        }
Example #6
0
 public override void Run()
 {
     WorkbenchSingleton.AddChild(
         new ReportForm(new AccountListReport(), RepositoryFactory.GetDaoFactory().CreateAccountDao().FindActiveDS()),
         "Account Listing"
         );
 }
Example #7
0
 public override void Run()
 {
     WorkbenchSingleton.AddChild(
         new ReportForm(new ItemPriceListReport(), RepositoryFactory.GetDaoFactory().CreateItemDao().FindActiveDS()),
         "Item Listing"
         );
 }
Example #8
0
 public override void Run()
 {
     WorkbenchSingleton.AddChild(
         new ReportForm(new VendorBalanceSummaryReport(), RepositoryFactory.GetDaoFactory().CreateVendorDao().FindActiveDS()),
         "Vendor Balance Summary"
         );
 }
Example #9
0
 public override void Run()
 {
     WorkbenchSingleton.AddChild(
         new ReportForm(new EmployeeContactListReport(), RepositoryFactory.GetDaoFactory().CreateEmployeeDao().FindActiveDS()),
         "Employee Contact List"
         );
 }
Example #10
0
 public override void Run()
 {
     WorkbenchSingleton.AddChild(
         new ReportForm(new APAgingDetailReport(), RepositoryFactory.GetDaoFactory().CreateVendorDao().FindActiveDS()),
         "A/P Aging Detail"
         );
 }
Example #11
0
        public override void Run()
        {
//			IBillController controller = new BillController(
//				new BillForm(),
//				new BillService(new NHibernateBillDao()),
//				new NHibernateVendorDao(),
//				new NHibernateAccountDao(),
//				new NHibernateTermsDao(),
//				new NHibernateItemDao(),
//				new BillItemForm(),
//				new ItemListOfValueForm(),
//				new BillAccountForm()
//			);
//			controller.ItemAdding += delegate(BillItem sender, EventArgs e) {
//				controller.BillItemView.BillItem = sender;
//				if (WorkbenchSingleton.AddDialog((Form)controller.BillItemView) == DialogResult.OK) {
//					controller.BillView.Bill.AddItem(controller.BillItemView.BillItem);
//				}
//			};
//			controller.FindItem += delegate {
//				if (WorkbenchSingleton.AddDialog((Form)controller.ItemListOfValueView) == DialogResult.OK) {
//					controller.BillItemView.BillItem.Item = controller.ItemListOfValueView.SelectedItem;
//				}
//			};
//			controller.AccountAdding += delegate(BillAccount sender, EventArgs e) {
//				controller.BillAccountView.BillAccount = sender;
//				if (WorkbenchSingleton.AddDialog((Form)controller.BillAccountView) == DialogResult.OK) {
//					controller.BillView.Bill.AddAccount(controller.BillAccountView.BillAccount);
//				}
//			};
//			WorkbenchSingleton.AddChild((Form)controller.BillView);
            BillForm form = new BillForm();

            WorkbenchSingleton.AddChild(form);
        }
Example #12
0
 public override void Run()
 {
     WorkbenchSingleton.AddChild(
         new ReportForm(new OpenInvoicesReport(), RepositoryFactory.GetDaoFactory().CreateInvoiceDao().FindOpenDS()),
         "Open Invoices"
         );
 }
Example #13
0
        public override void Run()
        {
            VisitForm form = new VisitForm();

//			IVisitDao visitDao = new NHibernateVisitDao();
//			IPatientDao patientDao = new NHibernatePatientDao();
            WorkbenchSingleton.AddChild(form);
        }
Example #14
0
 void ListView1DoubleClick(object sender, EventArgs e)
 {
     if (listView1.SelectedItems.Count > 0)
     {
         PhysicalCount c = counts[listView1.SelectedItems[0].Index];
         WorkbenchSingleton.AddChild(new PhysicalCountForm(c), "Edit Physical Count");
     }
 }
Example #15
0
 public PhysicalCountListForm()
 {
     InitializeComponent();
     listView1.Resize += delegate { columnHeader1.Width = listView1.Width - 22 - (columnHeader2.Width + columnHeader3.Width); };
     refreshToolStripMenuItem.Click += delegate { OnActivated(null); };
     addToolStripMenuItem.Click     += delegate { WorkbenchSingleton.AddChild(new PhysicalCountForm()); };
     modifyToolStripMenuItem.Click  += delegate { ListView1DoubleClick(this, null); };
 }
Example #16
0
 void ListView1DoubleClick(object sender, EventArgs e)
 {
     if (listView1.SelectedItems.Count > 0)
     {
         SalesInfo t = infos[listView1.SelectedItems[0].Index];
         WorkbenchSingleton.AddChild(new SalesInfoForm(t), "Edit Sales Information");
     }
 }
Example #17
0
        public override void Run()
        {
            VehicleTripListForm    form = new VehicleTripListForm();
            IVehicleTripRepository dao  = new NHibernateVehicleTripRepository();

            form.VehicleTripsList += delegate { form.VehicleTrips = dao.FindAll(); };
            WorkbenchSingleton.AddChild(form);
        }
Example #18
0
 void ModifyToolStripMenuItemClick(object sender, EventArgs e)
 {
     if (listView1.SelectedItems.Count > 0)
     {
         Module module = modules[listView1.SelectedItems[0].Index];
         WorkbenchSingleton.AddChild(new ModuleForm(module), "Edit Module");
     }
 }
Example #19
0
        public override void Run()
        {
            CategoryListForm form = new CategoryListForm();

            form.CategoriesList += delegate {
                form.Categories = Category.FindAll();
            };
            WorkbenchSingleton.AddChild(form);
        }
Example #20
0
        public override void Run()
        {
            CustomerCenterForm  form        = new CustomerCenterForm();
            ICustomerRepository customerDao = new NHibernateCustomerRepository();

            form.CustomersList += delegate { form.Customers = customerDao.FindActive(); };
            form.CustomerAdd   += delegate { new AddCustomer().Run(); };
            WorkbenchSingleton.AddChild(form);
        }
Example #21
0
		public override void Run()
		{
			UnitForm form = new UnitForm(unit);
			IUnitRepository dao = new NHibernateUnitRepository();
			form.UnitSave += delegate(object sender, UnitEventArgs e) { 
				dao.SaveOrUpdate(e.Unit);
				form.Close();
			};
			WorkbenchSingleton.AddChild(form, "Edit Unit");
		}
Example #22
0
        public override void Run()
        {
            CategoryForm form = new CategoryForm(category);

            form.CategorySave += delegate(Category sender, EventArgs e) {
                form.Category.SaveOrUpdate();
                form.Close();
            };
            WorkbenchSingleton.AddChild(form);
        }
Example #23
0
        public override void Run()
        {
            PositionForm        form = new PositionForm(position);
            IPositionRepository dao  = new NHibernatePositionRepository();

            form.PositionSave += delegate(object sender, PositionEventArgs e) {
                dao.SaveOrUpdate(e.Position);
                form.Close();
            };
            WorkbenchSingleton.AddChild(form, "Edit Position");
        }
Example #24
0
        public override void Run()
        {
            DepartmentForm        form = new DepartmentForm(department);
            IDepartmentRepository dao  = new NHibernateDepartmentRepository();

            form.DepartmentSave += delegate(object sender, DepartmentEventArgs e) {
                dao.SaveOrUpdate(e.Department);
                form.Close();
            };
            WorkbenchSingleton.AddChild(form, "Edit Department");
        }
Example #25
0
        public override void Run()
        {
            VendorForm        form = new VendorForm();
            IVendorRepository dao  = new NHibernateVendorRepository();

            form.VendorSave += delegate(object sender, VendorEventArgs e) {
                dao.SaveOrUpdate(e.Vendor);
                form.Close();
            };
            WorkbenchSingleton.AddChild(form);
        }
Example #26
0
        public override void Run()
        {
            TermsForm        form = new TermsForm(terms);
            ITermsRepository dao  = new NHibernateTermsRepository();

            form.TermsSave += delegate(object sender, TermsEventArgs e) {
                dao.SaveOrUpdate(e.Terms);
                form.Close();
            };
            WorkbenchSingleton.AddChild(form, "Edit Terms");
        }
Example #27
0
        public override void Run()
        {
            CustomerForm        form = new CustomerForm();
            ICustomerRepository dao  = new NHibernateCustomerRepository();

            form.CustomerSave += delegate(object sender, CustomerEventArgs e) {
                dao.SaveOrUpdate(e.Customer);
                form.Close();
            };
            WorkbenchSingleton.AddChild(form);
        }
Example #28
0
        public override void Run()
        {
            VehicleForm        form = new VehicleForm(vehicle);
            IVehicleRepository dao  = new NHibernateVehicleRepository();

            form.VehicleSave += delegate(object sender, VehicleEventArgs e) {
                dao.SaveOrUpdate(e.Vehicle);
                form.Close();
            };
            WorkbenchSingleton.AddChild(form, "Edit Vehicle");
        }
Example #29
0
        public override void Run()
        {
//			var view = new ToDoListForm();
//			view.ListToDos += delegate { view.ToDos = ToDo.FindActive(); };
//			view.DeleteToDo += delegate(ToDo sender, EventArgs e) { sender.Delete(); };
//			view.MakeInactiveToDo += delegate(ToDo sender, EventArgs e) { sender.MakeInactive(); };
//			view.MarkAsDoneToDo += delegate(ToDo sender, EventArgs e) { sender.MarkAsDone(); };
//			WorkbenchSingleton.AddChild(view);
            var form = new ToDoListForm();

            WorkbenchSingleton.AddChild(form);
        }
Example #30
0
        public override void Run()
        {
            PurchaseOrderForm        form      = new PurchaseOrderForm();
            IPurchaseOrderRepository orderDao  = new NHibernatePurchaseOrderRepository();
            IVendorRepository        vendorDao = new NHibernateVendorRepository();

            form.VendorsList += delegate { form.Vendors = vendorDao.FindActive(); };
            form.PurchaseOrderSaveAndClose += delegate(object sender, PurchaseOrderEventArgs e) {
                orderDao.SaveOrUpdate(e.PurchaseOrder);
                form.Close();
            };
            WorkbenchSingleton.AddChild(form);
        }