示例#1
0
    public string insertSearch(string fname, string lname, string department, string phone, string email)
    {
        searchClassDataContext objSearchDC = new searchClassDataContext();
        using (objSearchDC)
        {
            search_API objSearchInsert = new search_API(); 
            objSearchInsert.fname = fname;
            objSearchInsert.lname = lname;
            objSearchInsert.department = department;
            objSearchInsert.phone = phone;
            objSearchInsert.email = email;

            objSearchDC.search_APIs.InsertOnSubmit(objSearchInsert);
            objSearchDC.SubmitChanges();
            return "Your insert was successful"; 

        }
    }
 partial void Updatesearch_API(search_API instance);
 partial void Deletesearch_API(search_API instance);
 partial void Insertsearch_API(search_API instance);