예제 #1
0
 //THIS IS AN INSERT
 public bool commitInsert(string _OppTitle, string _Skills, string _Benefits, string _Other, string _CommitmentHow, string _CommitmentWhen, string _ContactPerson, string _Department, string _Reviewed)
 {
     volunteerClassDataContext objVol = new volunteerClassDataContext();
     try
     {
         brdhc_volunteerOpp objNewOpp = new brdhc_volunteerOpp();
         objNewOpp.OppTitle = _OppTitle;
         objNewOpp.Skills = _Skills;
         objNewOpp.Benefits = _Benefits;
         objNewOpp.Other = _Other;
         objNewOpp.CommitmentHow = _CommitmentHow;
         objNewOpp.CommitmentWhen = _Skills;
         objNewOpp.ContactPerson = _ContactPerson;
         objNewOpp.Department = _Department;
         objNewOpp.Reviewed = _Reviewed;
         objVol.brdhc_volunteerOpps.InsertOnSubmit(objNewOpp);
         objVol.SubmitChanges(); //this will commit the changes
         return true; //boolean
     }
     catch (Exception e)
     {
         clsCommon.saveError(e);
         return false;
     }
 }
 partial void Updatebrdhc_volunteerOpp(brdhc_volunteerOpp instance);
 partial void Deletebrdhc_volunteerOpp(brdhc_volunteerOpp instance);
 partial void Insertbrdhc_volunteerOpp(brdhc_volunteerOpp instance);