Exemple #1
0
        public void addClientInfo(clientInfo u)
        {
            tema2psEntities entities = new tema2psEntities();

            entities.clientInfoes.Add(u);
            entities.SaveChanges();
        }
Exemple #2
0
        public clientInfo getClientInfobyID(int id)
        {
            tema2psEntities entities = new tema2psEntities();
            clientInfo      u        = new clientInfo();

            foreach (clientInfo uDB in entities.clientInfoes)
            {
                if (uDB.id == id)
                {
                    u = uDB;
                }
            }
            return(u);
        }
Exemple #3
0
        public void updateclientInfo(clientInfo u)
        {
            tema2psEntities entities = new tema2psEntities();

            foreach (clientInfo uDB in entities.clientInfoes)
            {
                if (uDB.id == u.id)
                {
                    uDB.adress             = u.adress;
                    uDB.CNP                = u.CNP;
                    uDB.identityCardNumber = u.identityCardNumber;
                    uDB.userID             = u.userID;
                    uDB.name               = u.name;
                }
            }
            entities.SaveChanges();
        }