示例#1
0
        private void btnAdd_ItemClick(object sender, ItemClickEventArgs e)
        {
            Dialogbase dialogForm = null;

            switch (btnAdd.Caption.ToUpper())
            {
            case "ADD DAYBOOK":
                dialogForm = new frmAddDaybook();
                break;

            case "ADD CUSTOMER":
                dialogForm = new frmAddCustomer();
                break;

            case "ADD DRIVER":
                dialogForm = new frmAddDriver();
                break;

            case "ADD JOURNEY":
                dialogForm = new frmAddJourney();
                break;

            case "ADD TRUCK":
                dialogForm = new frmAddTruck();
                break;

            case "ADD TRAILER":
                dialogForm = new frmAddTrailer();
                break;
            }

            dialogForm.OnSaveForm += new Dialogbase.OnSaveFormEvent(CurrentForm.GetData);
            dialogForm.EditForm(0);
        }
示例#2
0
        public ctrlFormWorkload()
        {
            _customerService = new CustomerService() as ICustomerService;
            _daybookService  = new DaybookService() as IDaybookService;
            _invoiceService  = new InvoiceService() as IInvoiceService;
            _driverService   = new DriverService() as IDriverService;
            currentDialog    = new frmAddDaybook();
            InitializeComponent();

            OnLoad();
        }