Ejemplo n.º 1
0
        private object GetForm(int childForm)
        {
            Form retForm = null;

            switch (childForm)
            {
            case 1:
                retForm = new frmCustomer();
                break;

            case 2:
                retForm = new frmCustomer();
                break;

            default:
                break;
            }

            return(retForm);
        }
Ejemplo n.º 2
0
        private void ShowNewChildForm(FormType childForm)
        {
            String       frmAction = GetFormAction(childForm);
            DBactionType dbAction  = GetDbAction(childForm);

            switch (childForm)
            {
            case FormType.CUSTOMER_NEW:
                frmCustomer frmCustNew = new frmCustomer();
                ShowMDIChild(frmCustNew, frmAction, dbAction);
                break;

            case FormType.CUSTOMER_EDIT:
                frmCustomer frmCustEdit = new frmCustomer();
                ShowMDIChild(frmCustEdit, frmAction, dbAction);
                break;

            case FormType.CUSTOMER_DELETE:
                frmCustomer frmCustDelete = new frmCustomer();
                ShowMDIChild(frmCustDelete, frmAction, dbAction);
                break;

            case FormType.CUSTOMER_SEARCH:
                frmCustomer frmCustSearch = new frmCustomer();
                ShowMDIChild(frmCustSearch, frmAction, dbAction);
                break;

            case FormType.EMPLOYEE_NEW:
                frmCustomer frmEmplNew = new frmCustomer();
                ShowMDIChild(frmEmplNew, frmAction, dbAction);
                break;

            case FormType.EMPLOYEE_EDIT:
                frmCustomer frmEmplEdit = new frmCustomer();
                ShowMDIChild(frmEmplEdit, frmAction, dbAction);
                break;

            case FormType.EMPLOYEE_DELETE:
                frmCustomer frmEmplDelete = new frmCustomer();
                ShowMDIChild(frmEmplDelete, frmAction, dbAction);
                break;

            case FormType.EMPLOYEE_SEARCH:
                frmCustomer frmEmplSearch = new frmCustomer();
                ShowMDIChild(frmEmplSearch, frmAction, dbAction);
                break;

            case FormType.LEADS_NEW:
                frmLeads frmLeadsNew = new frmLeads();
                ShowMDIChild(frmLeadsNew, frmAction, dbAction);
                break;

            case FormType.LEADS_EDIT:
                frmLeads frmLeadsEdit = new frmLeads();
                ShowMDIChild(frmLeadsEdit, frmAction, dbAction);
                break;

            case FormType.LEADS_DELETE:
                frmLeads frmLeadsDelete = new frmLeads();
                ShowMDIChild(frmLeadsDelete, frmAction, dbAction);
                break;

            case FormType.LEADS_SEARCH:
                frmLeads frmLeadsSearch = new frmLeads();
                ShowMDIChild(frmLeadsSearch, frmAction, dbAction);
                break;

            case FormType.INVENTORY_NEW:
                frmInventory frmInvNew = new frmInventory();
                ShowMDIChild(frmInvNew, frmAction, dbAction);
                break;

            case FormType.INVENTORY_EDIT:
                frmInventory frmInvEdit = new frmInventory();
                ShowMDIChild(frmInvEdit, frmAction, dbAction);
                break;

            case FormType.INVENTORY_DELETE:
                frmInventory frmInvDelete = new frmInventory();
                ShowMDIChild(frmInvDelete, frmAction, dbAction);
                break;

            case FormType.INVENTORY_SEARCH:
                frmInventory frmInvSearch = new frmInventory();
                ShowMDIChild(frmInvSearch, frmAction, dbAction);
                break;

            case FormType.MAINTENANCE_NEW:
                frmMaintenanceOrders frmMaintNew = new frmMaintenanceOrders();
                ShowMDIChild(frmMaintNew, frmAction, dbAction);
                break;

            case FormType.MAINTENANCE_EDIT:
                frmMaintenanceOrders frmMaintEdit = new frmMaintenanceOrders();
                ShowMDIChild(frmMaintEdit, frmAction, dbAction);
                break;

            case FormType.MAINTENANCE_DELETE:
                frmMaintenanceOrders frmMaintDelete = new frmMaintenanceOrders();
                ShowMDIChild(frmMaintDelete, frmAction, dbAction);
                break;

            case FormType.MAINTENANCE_SEARCH:
                frmMaintenanceOrders frmMaintSearch = new frmMaintenanceOrders();
                ShowMDIChild(frmMaintSearch, frmAction, dbAction);
                break;

            case FormType.PURCHASES_NEW:
                frmPurchasing frmNewPurchases = new frmPurchasing();
                ShowMDIChild(frmNewPurchases, frmAction, dbAction);
                break;

            case FormType.PURCHASES_EDIT:
                frmPurchasing frmEditPurchases = new frmPurchasing();
                ShowMDIChild(frmEditPurchases, frmAction, dbAction);
                break;

            case FormType.PURCHASES_DELETE:
                frmPurchasing frmDeletePurchases = new frmPurchasing();
                ShowMDIChild(frmDeletePurchases, frmAction, dbAction);
                break;

            case FormType.PURCHASES_SEARCH:
                frmPurchasing frmSearchPurchases = new frmPurchasing();
                ShowMDIChild(frmSearchPurchases, frmAction, dbAction);
                break;

            default:
                break;
            }
        }