示例#1
0
        public void CanSetDefaultValues()
        {
            var customer4 = new Entity { EntityTypeId = 1 };
            customer4.SetDefaultValues("çapulcu emre");
            Assert.AreEqual("Çapulcu Emre", customer4.Name);

            var customer3 = new Entity { EntityTypeId = 1 };
            customer3.SetDefaultValues("Phone:5555555");
            Assert.AreEqual("5555555", customer3.GetCustomData("Phone"));
        }
 private void OnCreateEntity(string obj)
 {
     var targetEvent = _currentEntitySelectionRequest != null
                           ? _currentEntitySelectionRequest.GetExpectedEvent()
                           : EventTopicNames.SelectEntity;
     var newEntity = new Entity { EntityTypeId = SelectedEntityType.Id };
     newEntity.SetDefaultValues(SearchString);
     ClearSearchValues();
     CommonEventPublisher.PublishEntityOperation(newEntity, EventTopicNames.EditEntityDetails, targetEvent);
 }