void Member_BeforeSave(Member sender, umbraco.cms.businesslogic.SaveEventArgs e) { //DocumentType documentType = DocumentType.GetByAlias("Gymnast"); //Document document = Document.MakeNew(sender.Text, documentType, new User("admin"), int.Parse(UmbracoCustom.GetParameterValue(Parameter.GymnastDocument))); //document.getProperty("member").Value = sender.Id; //document.Save(); //Log.Add(LogTypes.New, int.Parse(UmbracoCustom.GetParameterValue(Parameter.GymnastDocument)), string.Format("Create new user {0} in Member_BeforeSave event", sender.Text)); }
void Document_BeforeSave(Document sender, umbraco.cms.businesslogic.SaveEventArgs e) { //throw new NotImplementedException(); //Property SendEmailNotification = sender.getProperty("sendEmailNotification"); //if (SendEmailNotification.Value.ToString() == "0") //{ //} //Property SendPushNotification = sender.getProperty("sendPushNotification"); //if (SendPushNotification.Value.ToString() == "0") //{ //} }
void Member_AfterSave(Member sender, umbraco.cms.businesslogic.SaveEventArgs e) { Document[] documents = Document.GetChildrenForTree(int.Parse(UmbracoCustom.GetParameterValue(UmbracoType.GymnastNode))); Document documentMember = documents.SingleOrDefault(d => d.Text == sender.Text); Property gymnast = sender.getProperty("gymnast"); if (documentMember == null && Roles.GetRolesForUser(sender.LoginName).Any()) { DocumentType documentType = DocumentType.GetByAlias("Gymnast"); Document document = Document.MakeNew(sender.Text, documentType, new User("admin"), int.Parse(UmbracoCustom.GetParameterValue(UmbracoType.GymnastNode))); document.getProperty("member").Value = sender.Id; document.Save(); gymnast.Value = document.Id; sender.Save(); //Log.Add(LogTypes.New, int.Parse(UmbracoCustom.GetParameterValue(UmbracoType.GymnastNode)), string.Format("Create new user {0} in Member_AfterSave event", sender.Text)); } else if (gymnast.Value == null && Roles.GetRolesForUser(sender.LoginName).Any()) { gymnast.Value = documentMember.Id; sender.Save(); } //sender.Save(); //if (sender.LoginName != sender.Text && documentMember == null) }
private void Media_AfterSave(Media sender, umbraco.cms.businesslogic.SaveEventArgs e) { //ensure that only the providers are flagged to listen execute IndexMedia(sender); }
void Document_AfterSave(Document sender, umbraco.cms.businesslogic.SaveEventArgs e) { //throw new NotImplementedException(); //Property SendEmailNotification = sender.getProperty("sendEmailNotification"); //Property SendPushNotification = sender.getProperty("sendPushNotification"); }