Click here to Skip to main content
15,905,508 members
Home / Discussions / C#
   

C#

 
AnswerRe: Need help with drawing circles on mouse click event in pictureBox Pin
Luc Pattyn16-Jan-10 6:13
sitebuilderLuc Pattyn16-Jan-10 6:13 
AnswerRe: Need help with drawing circles on mouse click event in pictureBox Pin
Dan Mos16-Jan-10 7:53
Dan Mos16-Jan-10 7:53 
QuestionBackgroundWorker with anonymous methods ? Pin
Mohammad Dayyan16-Jan-10 4:06
Mohammad Dayyan16-Jan-10 4:06 
AnswerRe: BackgroundWorker with anonymous methods ? Pin
Nicholas Butler16-Jan-10 4:59
sitebuilderNicholas Butler16-Jan-10 4:59 
GeneralRe: BackgroundWorker with anonymous methods ? Pin
Mohammad Dayyan16-Jan-10 6:58
Mohammad Dayyan16-Jan-10 6:58 
QuestionHolding data in memory Pin
Bardy8516-Jan-10 0:22
Bardy8516-Jan-10 0:22 
AnswerRe: Holding data in memory Pin
OriginalGriff16-Jan-10 1:01
mveOriginalGriff16-Jan-10 1:01 
GeneralRe: Holding data in memory Pin
Bardy8516-Jan-10 1:16
Bardy8516-Jan-10 1:16 
The employee record doesn't hold much, about 15 fields, like Name, Surname, Id, etc.
There can be up to about 5000 or so Employee records.
The app is batch application that runs every 5min.
I guess I'm not too worried about holding the data in memory, more about how I'm holding this data.

For EG the below class is how I hold and Edit the data.
My methods always seem to be public and I don't think that this is the right way of doing it.
Enen though it works.

public class EMPLOYEE
    {
        /// <summary>
        /// list of EMPLOYEEs
        /// </summary>
        public static List<Tools.DB.OL.Xtime.EMPLOYEE> listEMPLOYEE = new List<Tools.DB.OL.Xtime.EMPLOYEE>();

        #region Methods

        /// <summary>
        /// Fills the EMPLOYEE.
        /// </summary>
        public static void FillEMPLOYEE()
        {
            listEMPLOYEE = GenericFactory<Tools.DB.OL.Xtime.EMPLOYEE>.FillList("SELECT * FROM EMPLOYEE");
        }
        /// <summary>
        /// Inserts the specified new EMPLOYEE.
        /// </summary>
        /// <param name="employee">The employee.</param>
        public static void InsertEMPLOYEE(Tools.DB.OL.Xtime.EMPLOYEE employee)
        {
            GenericFactory<Tools.DB.OL.Xtime.EMPLOYEE>.Insert(ref listEMPLOYEE, employee);
        }
        /// <summary>
        /// Updates the specified new EMPLOYEE.
        /// </summary>
        /// <param name="employee">The employee.</param>
        public static void UpdateEMPLOYEE(Tools.DB.OL.Xtime.EMPLOYEE employee)
        {
            GenericFactory<Tools.DB.OL.Xtime.EMPLOYEE>.Update(ref listEMPLOYEE, employee);
        }
        /// <summary>
        /// Deletes the EMPLOYEE.
        /// </summary>
        /// <param name="employee">The employee.</param>
        public static void DeleteEMPLOYEE(Tools.DB.OL.Xtime.EMPLOYEE employee)
        {
            GenericFactory<Tools.DB.OL.Xtime.EMPLOYEE>.Delete(ref listEMPLOYEE, employee);
        }

        #endregion

        #region SQL Queries

        public static Tools.DB.OL.Xtime.EMPLOYEE FindEMPLOYEE(Predicate<Tools.DB.OL.Xtime.EMPLOYEE> p)
        {
            Tools.DB.OL.Xtime.EMPLOYEE employee = new Tools.DB.OL.Xtime.EMPLOYEE();
            if (listEMPLOYEE.Exists(p))
            {
                employee = listEMPLOYEE.Find(p);
            }
            return employee;
        }
        #endregion
    }

GeneralRe: Holding data in memory Pin
N a v a n e e t h16-Jan-10 6:05
N a v a n e e t h16-Jan-10 6:05 
GeneralRe: Holding data in memory Pin
Dan Mos16-Jan-10 7:21
Dan Mos16-Jan-10 7:21 
GeneralRe: Holding data in memory Pin
Bardy8516-Jan-10 9:21
Bardy8516-Jan-10 9:21 
GeneralRe: Holding data in memory Pin
Luc Pattyn16-Jan-10 10:05
sitebuilderLuc Pattyn16-Jan-10 10:05 
GeneralRe: Holding data in memory Pin
Bardy8516-Jan-10 10:56
Bardy8516-Jan-10 10:56 
GeneralRe: Holding data in memory [modified] Pin
Dan Mos16-Jan-10 11:01
Dan Mos16-Jan-10 11:01 
GeneralRe: Holding data in memory Pin
Bardy8516-Jan-10 9:28
Bardy8516-Jan-10 9:28 
GeneralRe: Holding data in memory Pin
Dan Mos16-Jan-10 10:48
Dan Mos16-Jan-10 10:48 
QuestionSystem.Drawing.Graphics Problem Pin
logicon15-Jan-10 23:17
logicon15-Jan-10 23:17 
AnswerRe: System.Drawing.Graphics Problem Pin
OriginalGriff15-Jan-10 23:34
mveOriginalGriff15-Jan-10 23:34 
GeneralRe: System.Drawing.Graphics Problem Pin
logicon16-Jan-10 0:38
logicon16-Jan-10 0:38 
GeneralRe: System.Drawing.Graphics Problem Pin
OriginalGriff16-Jan-10 0:54
mveOriginalGriff16-Jan-10 0:54 
QuestionAdd an Item to a ListView in VitualMode ? Pin
Mohammad Dayyan15-Jan-10 22:48
Mohammad Dayyan15-Jan-10 22:48 
AnswerRe: Add an Item to a ListView in VitualMode ? Pin
MumbleB16-Jan-10 5:41
MumbleB16-Jan-10 5:41 
GeneralRe: Add an Item to a ListView in VitualMode ? Pin
Mohammad Dayyan16-Jan-10 6:52
Mohammad Dayyan16-Jan-10 6:52 
QuestionDirectX Support In C#.Net Pin
ashwath197915-Jan-10 20:10
ashwath197915-Jan-10 20:10 
AnswerMessage Closed Pin
15-Jan-10 20:49
stancrm15-Jan-10 20:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.