Page Journal Web Service

Hello friends,
I try to write my first Page Web Service ,Now I am facing two issues ,

  1. How can Insert the value(Update) ?

  2. How can get Max value of Document_No?

My aim is insert General Journal Entry.I follow the link msdn.microsoft.com/…/dd355316.aspx

Web Service := ObjectID =>20 =>GeneralJournalEntries=>WebPageService

C# CodeSnippet below
Gen_Ledger_Entry_Service Service = new Gen_Ledger_Entry_Service();
Service.UseDefaultCredentials = true;
Service.Url = “localhost:7047/…/Gen_Ledger_Entry
Gen_Ledger_Entry GenEN=new Gen_Ledger_Entry();
GenEN.Document_Type=0;
GenEN.Document_No =”4344” and so on