/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button4_Click(object sender, EventArgs e) { LearningObjectContextModel ctx = new LearningObjectContextModel(); OntoLearningObject obj = new OntoLearningObject(); ctx.LearningObject_ID = txtID.Text; ctx.MediaFormat = txtMediaFormat.Text; ctx.MediaType = cmbMediaType.SelectedItem.ToString(); ctx.Title = txtTitle.Text; ctx.MoodleCommunity = TxtLOComunidade.Text; ctx.Link = txtLink.Text; ctx.ObjectLearningStyle = cmbLearningStyle.SelectedItem.ToString(); ctx.Description = txtDescription.Text; ctx.Idiom = cmbIdiom.SelectedItem.ToString(); ctx.Size = txtSize.Text; ctx.KeywordsList = txtkeyword.Text; var json = new JavaScriptSerializer().Serialize(ctx); Console.WriteLine(json); //WebServiceSoapClient.Service1 webSevice = new WebServiceSoapClient.Service1(); //webSevice.SaveLearningObjectinOntology(json); this.Cursor = Cursors.WaitCursor; ServiceReference3.Service1SoapClient soa = new Service1SoapClient(); soa.SaveLearningObjectinOntology(json); this.Cursor = Cursors.Default; }