Beispiel #1
0
        private Control GetMainControlFromFunctionMode(FunctionMode newMode)
        {
            /// Equipment Managmenet
            if (this.currentFunctionMode == FunctionMode.EQ_Inventory)
            {
                EQ_InventoryForm control = new EQ_InventoryForm();
                return(control);
            }
            if (this.currentFunctionMode == FunctionMode.EQ_AddEditRequest)
            {
                NEQ_RequestDetailControl control = new NEQ_RequestDetailControl();
                return(control);
            }
            if (this.currentFunctionMode == FunctionMode.EQ_ManageRequest)
            {
                NEQ_RequestListControl control = new NEQ_RequestListControl();
                //control.ItemDoubleClicked += new NEQ_RequestListControl.ItemDoubleClickedHandler(RequestListControl_ItemDoubleClicked);
                return(control);
            }
            if (this.currentFunctionMode == FunctionMode.EQ_AddEditQuote)
            {
                NEQ_QuoteDetailControl control = new NEQ_QuoteDetailControl();
                return(control);
            }
            if (this.currentFunctionMode == FunctionMode.EQ_ManageQuote)
            {
                NEQ_QuoteListControl control = new NEQ_QuoteListControl();
                //control.ItemDoubleClicked += new NEQ_QuoteListControl.ItemDoubleClickedHandler(QuoteListControl_ItemDoubleClicked);
                return(control);
            }
            if (this.currentFunctionMode == FunctionMode.EQ_AddEditContract)
            {
                NEQ_ContractDetailControl control = new NEQ_ContractDetailControl();
                return(control);
            }
            if (this.currentFunctionMode == FunctionMode.EQ_ManageContract)
            {
                NEQ_ContractListControl control = new NEQ_ContractListControl();
                //control.ItemDoubleClicked += new NEQ_ContractListControl.ItemDoubleClickedHandler(EQ_ContractListControl_ItemDoubleClicked);
                return(control);
            }
            if (this.currentFunctionMode == FunctionMode.EQ_AddEditOrder)
            {
                NEQ_OrderDetailControl control = new NEQ_OrderDetailControl();
                return(control);
            }
            if (this.currentFunctionMode == FunctionMode.EQ_ManageOrder)
            {
                NEQ_OrderListControl control = new NEQ_OrderListControl();
                //control.ItemDoubleClicked += new NEQ_OrderListControl.ItemDoubleClickedHandler(EQ_OrderListControl_ItemDoubleClicked);
                return(control);
            }
            if (this.currentFunctionMode == FunctionMode.EQ_AddEditInput)
            {
                NEQ_InputDetailControl control = new NEQ_InputDetailControl();
                return(control);
            }
            if (this.currentFunctionMode == FunctionMode.EQ_ManageInput)
            {
                NEQ_InputListControl control = new NEQ_InputListControl();
                //control.ItemDoubleClicked += new NEQ_InputListControl.ItemDoubleClickedHandler(EQ_InputListControl_ItemDoubleClicked);
                return(control);
            }
            if (this.currentFunctionMode == FunctionMode.EQ_AddEditOutput)
            {
                NEQ_OutputDetailControl control = new NEQ_OutputDetailControl();
                return(control);
            }
            if (this.currentFunctionMode == FunctionMode.EQ_AddEditDirectOutput)
            {
                NEQ_DirectOutputControl control = new NEQ_DirectOutputControl();
                return(control);
            }
            if (this.currentFunctionMode == FunctionMode.EQ_AddEditInUseOutput)
            {
                NEQ_InUseOutputControl control = new NEQ_InUseOutputControl();
                return(control);
            }
            if (this.currentFunctionMode == FunctionMode.EQ_ManageOutput)
            {
                NEQ_OutputListControl control = new NEQ_OutputListControl();
                //control.ItemDoubleClicked += new NEQ_OutputListControl.ItemDoubleClickedHandler(EQ_OutputListControl_ItemDoubleClicked);
                return(control);
            }

            // For Equipment support
            if (this.currentFunctionMode == FunctionMode.EQ_EquipmentCheck)
            {
                return(new EQ_EquipmentCheck());
            }
            if (this.currentFunctionMode == FunctionMode.EQ_BrowseData)
            {
                return(new EQ_BrowseData());
            }

            /// Hệ thống danh mục
            if (this.currentFunctionMode == FunctionMode.Equipment)
            {
                return(new NEquipmentList());
            }
            if (this.currentFunctionMode == FunctionMode.EQ_Category)
            {
                return(new EQ_CategoryList());
            }
            if (this.currentFunctionMode == FunctionMode.Unit)
            {
                return(new UnitList());
            }
            if (this.currentFunctionMode == FunctionMode.CoType)
            {
                return(new CompanyTypeList());
            }
            if (this.currentFunctionMode == FunctionMode.Supplier)
            {
                return(new NSupplierList());
            }
            if (this.currentFunctionMode == FunctionMode.Department)
            {
                return(new DepartmentList());
            }
            if (this.currentFunctionMode == FunctionMode.Employee)
            {
                return(new EmployeeList());
            }
            if (this.currentFunctionMode == FunctionMode.Role)
            {
                return(new RoleList());
            }
            if (this.currentFunctionMode == FunctionMode.User)
            {
                return(new UserList());
            }
            if (this.currentFunctionMode == FunctionMode.Store)
            {
                return(new NStoreList());
            }
            if (this.currentFunctionMode == FunctionMode.StoreLocation)
            {
                return(new NStoreLocationList());
            }

            /// For Equipment Reports
            if (this.currentFunctionMode == FunctionMode.EQ_EquipmentReport)
            {
                return(new EQ_EquipmentReport());
            }
            if (this.currentFunctionMode == FunctionMode.EQ_StoreReport)
            {
                return(new EQ_StoreReport());
            }
            if (this.currentFunctionMode == FunctionMode.EQ_RequestRpt)
            {
                return(new EQ_RequestReport());
            }
            if (this.currentFunctionMode == FunctionMode.EQ_QuotationRpt)
            {
                return(new EQ_QuotationReport());
            }
            if (this.currentFunctionMode == FunctionMode.EQ_OrderRpt)
            {
                return(new EQ_OrderReport());
            }
            return(null);
        }
Beispiel #2
0
 private void QuoteListControl_ItemDoubleClicked(EQ_Quotes quote)
 {
     ChangeFunctionMode(FunctionMode.EQ_AddEditQuote);
     NEQ_QuoteDetailControl control = mainPanel.Controls[mainPanel.Controls.Count - 1] as NEQ_QuoteDetailControl;
     //control.EditQuote(quote);
 }