public CasePropertyViewModel(CaseProperty item)
 {
     ViewTitle = new ViewTitleBase()
     {
         Title = "Edit Info Value", SubTitle = "SETTINGS".Localize(null, LocalizationScope.DefaultCategory)
     };
     InnerItem = item;
 }
Esempio n. 2
0
        private void RaiseItemAddInteractionRequest()
        {
            var item = new CaseProperty();

            if (RaiseItemEditInteractionRequest(item, "Create Info Value".Localize()))
            {
                InnerItem.CaseProperties.Add(item);
                IsModified = true;
            }
        }
Esempio n. 3
0
        private void RaiseItemEditInteractionRequest(CaseProperty originalItem)
        {
            var item = originalItem.DeepClone(EntityFactory as IKnownSerializationTypes);

            if (RaiseItemEditInteractionRequest(item, "Edit Info Value".Localize()))
            {
                // copy all values to original:
                OnUIThread(() => originalItem.InjectFrom <CloneInjection>(item));
                IsModified = true;
            }
        }
Esempio n. 4
0
        private void RaiseItemDeleteInteractionRequest(CaseProperty item)
        {
            var confirmation = new ConditionalConfirmation
            {
                Content = string.Format("Are you sure you want to delete Info Value '{0}'?".Localize(), item.Name),
                Title   = "Delete confirmation".Localize(null, LocalizationScope.DefaultCategory)
            };

            CommonConfirmRequest.Raise(confirmation, (x) =>
            {
                if (x.Confirmed)
                {
                    InnerItem.CaseProperties.Remove(item);
                    IsModified = true;
                }
            });
        }
Esempio n. 5
0
        private bool RaiseItemEditInteractionRequest(CaseProperty item, string title)
        {
            var result = false;

            var itemVM       = _casePropertyVmFactory.GetViewModelInstance(new KeyValuePair <string, object>("item", item));
            var confirmation = new ConditionalConfirmation(item.Validate)
            {
                Title = title, Content = itemVM
            };

            CommonConfirmRequest.Raise(confirmation, (x) =>
            {
                result = x.Confirmed;
            });

            return(result);
        }
Esempio n. 6
0
    private void SaveCasePropertyValue(string PropertyName, string PropertyValue, string ProcedureCode)
    {
        string    PropertyCode             = "";
        string    WorkFlowCasePropertyCode = "";
        Procedure procedure = DefinitionManager.GetProcedureDifinition(ProcedureCode, true);

        System.Collections.IDictionaryEnumerator ie = procedure.GetPropertyEnumerator();
        while (ie.MoveNext())
        {
            Property PropertyCase = (Property)ie.Value;
            if (PropertyCase.ProcedurePropertyName == PropertyName)
            {
                PropertyCode = PropertyCase.WorkFlowProcedurePropertyCode;
            }
        }

        if (this.CaseCode + "" != "")
        {
            WorkCase workCase = Rms.WorkFlow.WorkCaseManager.GetWorkCase(this.CaseCode);

            ie = workCase.GetCasePropertyEnumerator();
            while (ie.MoveNext())
            {
                CaseProperty CasePropertyCase = (CaseProperty)ie.Value;
                if (CasePropertyCase.ProcedurePropertyCode == PropertyCode)
                {
                    WorkFlowCasePropertyCode = CasePropertyCase.WorkFlowCasePropertyCode;
                }
            }
        }
        if (PropertyCode != "")
        {
            CaseProperty CasePropertyCaseM = new CaseProperty();
            CasePropertyCaseM.WorkFlowCasePropertyCode = WorkFlowCasePropertyCode;
            CasePropertyCaseM.CaseCode = this.CaseCode;
            CasePropertyCaseM.ProcedurePropertyCode  = PropertyCode;
            CasePropertyCaseM.ProcedurePropertyValue = PropertyValue;

            RmsPM.BLL.WorkFlowRule.SaveCaseProperty(CasePropertyCaseM);
        }
    }
Esempio n. 7
0
 set => SetValue(CaseProperty, value);