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 6203233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:52:41+00:00 2026-05-24T04:52:41+00:00

I am running into issues with an application that I wrote. Basically it is

  • 0

I am running into issues with an application that I wrote. Basically it is a month calendar that is made out of panels/listboxes for each day of the month. I populate my listboxes using the following:

private void PopulateEventListBoxes(int offsetNumber, int monthDays)
{
    string locationSelected = this.LocationComboBox.Text.ToLower();

    for (int i = 0; i <= (monthDays - 1); i++)
    {
        DateTime dateSelected = Convert.ToDateTime(m_ArrayDateLabel[offsetNumber + i].Text).Date;

        var tempCalendar = new Data.DataSet.vwGet_CalendarDetailsDataTable();

        switch (locationSelected)
        {
            case "all":
                Data.Manager.CalendarDetailsTableAdapter.FillByDate(tempCalendar, dateSelected);
                break;
            default:
                Data.Manager.CalendarDetailsTableAdapter.FillByDateCity(tempCalendar, dateSelected, locationSelected);
                break;
        }

        foreach (Data.DataSet.vwGet_CalendarDetailsRow row in tempCalendar)
        {
            ((ListBox)m_ArrayEventListBox[offsetNumber + i]).Items.Add(row.Name + " - " + row.StatusCode);
        }
    }
}

I am using the var tempCalendar = new Data.DataSet.vwGet_CalendarDetailsDataTable(); for the DataTable because I need to load the day events into each of the listboxes. This data is coming from SQL server from a view.

Once the Calendar loaded, the users have the ability to Add/Edit/Delete items through a pop-up Dialog with the Calendar details for the day. When the Dialog loads to Add/Edit I populate it this way:

private void SearchForEventsByDate()
{
    switch (m_LocationSelected)
    {
        case "all":
            Data.Manager.CalendarDetailsTableAdapter.FillByDate(DataSetCalendar.vwGet_CalendarDetails, m_DateSelected);
            CalendarDetailsBindingSource.DataSource = DataSetCalendar.vwGet_CalendarDetails;
            break;
        default:
            Data.Manager.CalendarDetailsTableAdapter.FillByDateCity(DataSetCalendar.vwGet_CalendarDetails, m_DateSelected, m_LocationSelected);
            CalendarDetailsBindingSource.DataSource = DataSetCalendar.vwGet_CalendarDetails;
            break;
    }

    RefreshRepRecordCount();
}

This time when load the data, I am using the call DataSetCalendar.vwGet_CalendarDetails instead of a temp memory version of the datatable.

My issue is coming into play if I follow these procedures:

  1. Add new event for an employee
  2. Delete that same event that I just added
  3. Try and re-add new event for the employee on the same day – the app throws an error that the GUID is already present in the table.

My table’s primary key is EventDate and EmployeeGuid. If I query the SQL table after the delete, there is no record but my application still thinks the record still exists. I know that the record is in the memory.

I have tried the following to remove it from memory but it is not working:

DataSetCalendar.vwGet_CalendarDetails.FindByEmployeeGUID(SelectedCalendarEvent.EmployeeGUID).Delete();
DataSetCalendar.vwGet_CalendarDetails.AcceptChanges();

I have also tried using Remove to get rid of the record but my app still think the record exists. I don’t know what else to do or try. Any help would be great.

  • 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-24T04:52:41+00:00Added an answer on May 24, 2026 at 4:52 am

    I was able to fix this by adding the Clear()

    private void SearchForEventsByDate()
    {
        switch (m_LocationSelected)
        {
           case "all":
             Data.Manager.Data.SM_T_Employee_Status.Clear();
             DataSetCalendar.vwGet_CalendarDetails.Clear();
    
             Data.Manager.CalendarDetailsTableAdapter.FillByDate(DataSetCalendar.vwGet_CalendarDetails, m_DateSelected);
              CalendarDetailsBindingSource.DataSource = DataSetCalendar.vwGet_CalendarDetails;
              break;
           default:
              Data.Manager.Data.SM_T_Employee_Status.Clear();
              DataSetCalendar.vwGet_CalendarDetails.Clear();
              Data.Manager.CalendarDetailsTableAdapter.FillByDateCity(DataSetCalendar.vwGet_CalendarDetails, m_DateSelected, m_LocationSelected);
              CalendarDetailsBindingSource.DataSource = DataSetCalendar.vwGet_CalendarDetails;
              break;
         }
    
     RefreshRepRecordCount();
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're running into issues with how we specify font sizes. If we specify the
I'm currently running into some issues resizing images using GD. Everything works fine until
I've compiled a java project into a Jar file, and am having issues running
I have been recently running into an issue in which my web application will
I'm running into an issue and I wanted to confirm that I'm doing things
I'm attempt to debug a program I wrote, but I'm running into a problem
I'm running into an issue where I have a FileUpload control in an UpdatePanel.
I am running into an issue I had before; can't find my reference on
I'm running into an issue where granting EXECUTE permissions on a specific Stored Procedure
I am running into this issue of releasing an already released object but can't

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.