Beispiel #1
0
        public void NewItem <ViewType>(string subsystemName, string baseUri, DataSubSystem subsystem, string eventManagerName)
        {
            var id         = DataIdentifier.NewId();
            var newDo      = DataProvider.GetNewDo(id);
            var tmp        = subsystemName;
            var upperFirst = tmp.ToUpper();

            tmp = upperFirst[0] + subsystemName.Substring(1);
            var viewName       = KarveLocale.Properties.Resources.lnew + " " + tmp + "." + id;
            var uri            = new Uri(baseUri + Guid.NewGuid().ToString());
            var currentPayload = BuildShowPayLoadDo(uri.ToString(), newDo);

            currentPayload.Subsystem       = subsystem;
            currentPayload.PayloadType     = DataPayLoad.Type.Insert;
            currentPayload.PrimaryKeyValue = id;
            currentPayload.Sender          = "karve://viewfactory";
            currentPayload.Destination     = uri;
            CreateNewItem <ViewType>(viewName, uri, currentPayload);
            EventManager.NotifyObserverSubsystem(eventManagerName, currentPayload);
        }