Click here to Skip to main content
15,918,706 members
Home / Discussions / C#
   

C#

 
GeneralRe: Retreiving next autonumber value Pin
Dave Kreskowiak17-Jan-10 8:55
mveDave Kreskowiak17-Jan-10 8:55 
GeneralRe: Retreiving next autonumber value Pin
tonyonlinux17-Jan-10 9:19
tonyonlinux17-Jan-10 9:19 
GeneralRe: Retreiving next autonumber value Pin
Dave Kreskowiak17-Jan-10 15:05
mveDave Kreskowiak17-Jan-10 15:05 
GeneralRe: Retreiving next autonumber value Pin
tonyonlinux17-Jan-10 18:39
tonyonlinux17-Jan-10 18:39 
AnswerRe: Retreiving next autonumber value Pin
PIEBALDconsult17-Jan-10 5:13
mvePIEBALDconsult17-Jan-10 5:13 
QuestionHelp with PictureBox.image updating from Webcam capture Pin
shutupsquare16-Jan-10 9:49
shutupsquare16-Jan-10 9:49 
AnswerRe: Help with PictureBox.image updating from Webcam capture Pin
Luc Pattyn16-Jan-10 10:03
sitebuilderLuc Pattyn16-Jan-10 10:03 
GeneralRe: Help with PictureBox.image updating from Webcam capture Pin
shutupsquare16-Jan-10 10:17
shutupsquare16-Jan-10 10:17 
AnswerRe: Help with PictureBox.image updating from Webcam capture Pin
shutupsquare16-Jan-10 10:08
shutupsquare16-Jan-10 10:08 
GeneralRe: Help with PictureBox.image updating from Webcam capture Pin
Luc Pattyn16-Jan-10 11:05
sitebuilderLuc Pattyn16-Jan-10 11:05 
GeneralRe: Help with PictureBox.image updating from Webcam capture Pin
shutupsquare16-Jan-10 12:56
shutupsquare16-Jan-10 12:56 
GeneralRe: Help with PictureBox.image updating from Webcam capture Pin
Luc Pattyn16-Jan-10 13:03
sitebuilderLuc Pattyn16-Jan-10 13:03 
Questionencapsulation understanding problems Pin
binn01916-Jan-10 6:41
binn01916-Jan-10 6:41 
AnswerRe: encapsulation understanding problems Pin
Jimmanuel16-Jan-10 7:11
Jimmanuel16-Jan-10 7:11 
GeneralRe: encapsulation understanding problems Pin
binn01924-Jan-10 0:02
binn01924-Jan-10 0:02 
QuestionNeed help with drawing circles on mouse click event in pictureBox Pin
Midex16-Jan-10 5:49
Midex16-Jan-10 5:49 
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 

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.