private void detach_Applicants(Applicant entity) { this.SendPropertyChanging(); entity.Career = null; }
private void attach_Applicants(Applicant entity) { this.SendPropertyChanging(); entity.Career = this; }
partial void DeleteApplicant(Applicant instance);
partial void UpdateApplicant(Applicant instance);
partial void InsertApplicant(Applicant instance);
public bool commitInsert(int _careerid, string _fname, string _lname, string _unitno, string _streetno, string _streetname, string _city, string _province, string _pcode, string _tnumber, string _email, string _resumeurl) { //creating an instance of our LINQ object NorthBayDataContext objCareersDC = new NorthBayDataContext(); //to ensure all data will be disposed when finished using (objCareersDC) { //create an instance of our table object Applicant objnewApplicant = new Applicant(); //set table columns to the new values that will be passed from the *.aspx page objnewApplicant.CareerId = _careerid; objnewApplicant.Fname = _fname; objnewApplicant.Lname = _lname; objnewApplicant.UnitNo = _unitno; objnewApplicant.StreetNo = _streetno; objnewApplicant.StreetName = _streetname; objnewApplicant.City = _city; objnewApplicant.Province = _province; objnewApplicant.Pcode = _pcode; objnewApplicant.Tnumber = _tnumber; objnewApplicant.Email = _email; objnewApplicant.ResumeUrl = _resumeurl; //insert command objCareersDC.Applicants.InsertOnSubmit(objnewApplicant); //commit insert against database objCareersDC.SubmitChanges(); return true; } }