Exemplo n.º 1
0
    public static DataTable getClients(string searchValue, SearchOption searchKey, string location)
    {
        DataTable returnDataTable = new DataTable();

        switch (searchKey)
        {
        case SearchOption.ACCOUNT_NUMBER:
            returnDataTable = DL_Clients.getClientsByAccountNumber(searchValue, location);
            break;

        case SearchOption.ACCOUNT_NAME:
            returnDataTable = DL_Clients.getClientsByAccountName(searchValue, location);
            break;

        case SearchOption.ACCOUNT_MNEMONIC:
            returnDataTable = DL_Clients.getClientsByAccountMnemonic(searchValue, location);
            break;

        case SearchOption.PHONE_NUMBER:
            returnDataTable = DL_Clients.getClientsByPhoneNumber(searchValue, location);
            break;

        case SearchOption.ZOASIS_NUMBER:
            returnDataTable = DL_Clients.getClientsByZoasisNumber(searchValue, location);
            break;
        }
        return(returnDataTable);
    }
Exemplo n.º 2
0
    public static DataTable getClients(string searchValue, SearchOption searchKey, Int32 startIndex, Int32 noOfRecords)
    {
        DataTable returnDataTable = new DataTable();

        switch (searchKey)
        {
        case SearchOption.ACCOUNT_NUMBER:
            returnDataTable = DL_Clients.getClientsByAccountNumber(searchValue);
            break;

        case SearchOption.ACCOUNT_NAME:
            returnDataTable = DL_Clients.getClientsByAccountName(searchValue, startIndex, noOfRecords);
            break;

        case SearchOption.ACCOUNT_MNEMONIC:
            returnDataTable = DL_Clients.getClientsByAccountMnemonic(searchValue);
            break;

        case SearchOption.PHONE_NUMBER:
            returnDataTable = DL_Clients.getClientsByPhoneNumber(searchValue, startIndex, noOfRecords);
            break;

        case SearchOption.ROUTE_STOP:
            returnDataTable = DL_Clients.getClientsByRouteStop(searchValue);
            break;

        case SearchOption.SALES_TERRITORY:
            returnDataTable = DL_Clients.getClientsBySalesTerritory(searchValue);
            break;

        case SearchOption.ZOASIS_NUMBER:
            returnDataTable = DL_Clients.getClientsByZoasisNumber(searchValue);
            break;
        }
        return(returnDataTable);
    }