Example #1
0
        private void ChangeAttribute(EntityAttribute attribute, string action)
        {
            var att_to_edit = attribute as EntityAttribute;

            if (att_to_edit != null)
            {
                var notification = new ItemEditNotification(att_to_edit);
                notification.Title = action + " Attribute";
                EditAttributeRequest.Raise(notification,
                                           r =>
                {
                    if (r != null && r.Confirmed && r.EditibleObject != null)     //
                    {
                        var att = r.EditibleObject as EntityAttribute;
                        if (att != null)
                        {
                            var att_to_change = AttSelectedItem as EntityAttributeWrapper;
                            if (att_to_change != null)
                            {
                                att_to_change.AttributeValue = att.AttributeValue;
                            }
                        }
                    }
                });
            }
        }
Example #2
0
 private void ChangeAttribute(EntityAttribute attribute, string action)
 {
     if (attribute is EntityAttribute att_to_edit)
     {
         var notification = new ItemEditNotification(att_to_edit);
         notification.Title = action + " Attribute"; //+ emp_to_edit.PersonCode + " - " + emp_to_edit.PersonFullNameFML;
         EditAttributeRequest.Raise(notification,
                                    r =>
         {
             if (r != null && r.Confirmed && r.EditibleObject != null)     //
             {
                 if (r.EditibleObject is EntityAttribute att)
                 {
                     if (AttSelectedItem is EntityAttributeWrapper att_to_change)
                     {
                         att_to_change.AttributeValue = att.AttributeValue;
                     }
                 }
             }
         });
     }
 }