internal static void Guardar(Contacto _contacto) { String webUrl = "http://sharepointser"; SPSecurity.RunWithElevatedPrivileges(delegate() { using (var site = new SPSite(webUrl)) { using (var web = site.OpenWeb()) { SPListItemCollection list = web.Lists["Contactos"].Items; SPListItem item = list.Add(); item["Title"] = _contacto.Nombre; item["Identificacion"] = _contacto.Identificacion; var allowUnsafeUpdates = web.AllowUnsafeUpdates; web.AllowUnsafeUpdates = true; item.Update(); web.AllowUnsafeUpdates = allowUnsafeUpdates; } } }); }
public void ActualizarVista(Contacto contacto) { _vista.Identificacion = contacto.Identificacion; _vista.Nombre = contacto.Nombre; }
public PresentadorContacto(IVistaContactos vista) { _vista = vista; _contacto = new Contacto(); }