partial void DeletePERSON(PERSON instance);
partial void InsertPERSON(PERSON instance);
partial void UpdatePERSON(PERSON instance);
/*This method means the method InsertOnSubmit status insert data into a pending state, * then the method SubmitChanges performs the necessary changes within the database, this method requires the necessary arguments for entering data, * all the while using the class that exposes all ContactDataContext methods * needed in the iteration with the data as we shall see in subsequent methods. */ public static void InsertData(string name, string surname, string address, string zipcode, string city, string state, string activity) { using (var ctx = new ContactDataContext(Properties.Settings.Default.path)) { var newperson = new PERSON { NAME = name.ToUpper(), SURNAME = surname.ToUpper(), ADDRESS = address.ToUpper(), ZIPCODE = zipcode.ToUpper(), CITY = city.ToUpper() }; ctx.PERSON.InsertOnSubmit(newperson); ctx.SubmitChanges(); var newjob = new JOB { IDPERSON = newperson.ID, STATE = state, ACTIVITY = activity }; ctx.JOB.InsertOnSubmit(newjob); ctx.SubmitChanges(); } }