Beispiel #1
0
    public bool commitInsert(string _fname, string _lname, string _dept, string _email, string _message)
    {
        directcontactDataContext objContactDC = new directcontactDataContext();
        using (objContactDC)
        {
            direct_contact objNewContact = new direct_contact();
            objNewContact.firstname = _fname;
            objNewContact.lastname = _lname;
            objNewContact.department = _dept;
            objNewContact.email = _email;
            objNewContact.message = _message;

            objContactDC.direct_contacts.InsertOnSubmit(objNewContact);
            objContactDC.SubmitChanges();
            return true;
        }
    }
 partial void Deletedirect_contact(direct_contact instance);
 partial void Updatedirect_contact(direct_contact instance);
 partial void Insertdirect_contact(direct_contact instance);