예제 #1
0
        /* ------------------------------ Add Relation ------------------------------ */
        public void AddRelation(string Alias, int PersonID, int ContactID, int RemainingTime)
        {
            /// <summary> Adds an relation between two people
            /// <para> Doing this by adding the connection to Person_Person table

            string executeString = string.Format("INSERT INTO Student29.dbo.Person_Person (Alias, PersonID, ContactID, RemainingTime) VALUES ('{0}', {1}, {2}, {3})", Alias, PersonID, ContactID, RemainingTime);

            Person_PersonTable.SendQuery(executeString);
            Debug.WriteLine("Successfully sent: " + executeString);
        }
예제 #2
0
        public void UpdateDatetime(Person_PersonTable person_PersonTable)
        {
            /// <summary> Adds an relation between two people
            /// <para> Doing this by adding the connection to Person_Person table

            string executeString = string.Format("UPDATE Student29.dbo.Person_Person SET lastCommunication ='{0}' where ContactID='{1}'", person_PersonTable.lastCommunication, person_PersonTable.ContactID);

            Person_PersonTable.SendQuery(executeString);
            Debug.WriteLine("Successfully sent: " + executeString);
        }
예제 #3
0
        /* ------------------------ Change Remaining Time ------------------------ */
        public void ChangeRemainingTime(int PersonID)
        {
            string executeString = string.Format("UPDATE Student29.dbo.Person_Person SET RemainingTime =- 1", PersonID);

            Person_PersonTable.SendQuery(executeString);
        }