Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6648453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:39:25+00:00 2026-05-26T00:39:25+00:00

Learning C# here. I have a monthly process form whereby one can select to

  • 0

Learning C# here. I have a monthly process form whereby one can select to process salaries for all employees or select the employees to process for using radio buttons (SAP B1 form using screenpainter).

One is able to open a form to select employees and the employee ID’s are sent to this monthly process form and are stored in a list.

//Method to retrieve string values from child form
public void GetFilteredIds(List<string> idValues)
{
    List<string> employeeIDs = new List<string>();

    employeeIDs = idValues;
}

I wanted to filter this query on the monthly process form that selects ALL emp IDs

//Query database
var salaryFitments = salaryFitmentService.GetAllSalaryFitments();

var employeeIdList = (from sf in salaryFitments select sf.U_Employee_ID).Distinct();

such that I have something similar to this:

var k = from id in employeeIdList
           where employeeIDs.Contains(id)
           select id;

How do I write my code such that just before processing (hitting a process button), I have an if statement to check if its a monthly process for all or just a few selected

if (_selectedEmployees.Selected == true)
{
   ...code to write
}
else
{
   ...code to write
}

_selectedEmployees refers to private SAPbouiCOM.OptionBtn _selectedEmployees;

Just before processing

if (employeeIdList.Any())
            {  ............

I hope my question is clear enough

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:39:25+00:00Added an answer on May 26, 2026 at 12:39 am

    Not 100% sure what you’re after, but would this help:

    // Code to see if the 'all employees' radiobutton is selected.
    
    var k = from id in employeeIdList
            where AllSelected || employeeIDs.Contains(id)
            select id;
    

    You wouldn’t have to duplicate your query then.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok still learning here. If I have one form calling another form like below
I'm still learning Grails and seem to have hit a stumbling block. Here are
Forgive my ignorance - still learning here. I am using Eclipse Ganymede (Java 1.5)
I'm learning Java here, and using a GLabel object. It's in the ACM Graphics
I have been lurking and learning in here for a while. Now i have
Still learning JSP Web Applications here. I have been doing this for a while
I have just started learning pthreads API and I am following the tutorial here
I'm still learning here and have a question about child collections. I have an
learning html/css here. I can't seem to understand how to tweak this drop down
I have just started learning PHP, and here's my first doubt... Both of these

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.