public void PersonSocialNetwork(int idMeeting) { using (var db = FactoryConn.GetConn()) { try { var MeetingId = int.Parse(idMeeting.ToString()); var dto = new ModelContainer(); dto.Reference = db.Table <Meeting> ().Where(s => s.Id == idMeeting).FirstOrDefault().CaseDetentionId.ToString() ?? ""; SocialNetwork me = db.Table <SocialNetwork> ().Where(mee => mee.MeetingId == idMeeting).FirstOrDefault(); if (me == null) { me = new SocialNetwork(); me.Comment = ""; me.MeetingId = idMeeting; db.Insert(me); } PersonSocialNetwork mdl = new PersonSocialNetwork(); mdl.SocialNetworkId = me.Id; dto.JsonModel = JsonConvert.SerializeObject(mdl); var temp = new PersonSocialNetworkUpsert { Model = dto }; var pagestring = "nada que ver"; pagestring = temp.GenerateString(); webView.LoadHtmlString(pagestring); } catch (Exception e) { db.Rollback(); Console.WriteLine("catched exception in MeetingController method PersonSocialNetwork"); Console.WriteLine("Exception message :::>" + e.Message); } finally { db.Commit(); } db.Close(); } }
public PersonSocialNetworkVerificationDto(PersonSocialNetwork nuevo) { this.Address = nuevo.Address; this.Age = nuevo.Age; this.block = nuevo.block; this.DependentId = nuevo.DependentId; this.DocumentTypeId = nuevo.DocumentTypeId; this.Id = nuevo.Id; this.isAccompaniment = nuevo.isAccompaniment; this.LivingWithIde = nuevo.LivingWithIde; this.Name = nuevo.Name; this.Phone = nuevo.Phone; this.RelationshipId = nuevo.RelationshipId; this.SocialNetworkId = nuevo.SocialNetworkId; this.SpecificationDocumentType = nuevo.SpecificationDocumentType; this.specificationRelationship = nuevo.specificationRelationship; }