private void DeleteSelectedInputField(object param)
        {
            ServiceStoreParams selectedItem     = (ServiceStoreParams)((DataGrid)param).SelectedItem;
            MessageBoxResult   messageBoxResult = MessageBox.Show("Valóban törli?", "Törlés megerősítése", MessageBoxButton.YesNo, MessageBoxImage.Question);

            if (messageBoxResult == MessageBoxResult.Yes)
            {
                InputFieldList.Remove(selectedItem);
                ServiceStoreParamsDal.LogicalDelete(selectedItem);
            }
        }
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            ServiceStoreParams param = (ServiceStoreParams)value;

            if (param.IsCustom)
            {
                return("-");
            }
            ServiceTableFieldDAL ServiceTableFieldDal = new ServiceTableFieldDAL();

            return(ServiceTableFieldDal.FindById((int)param.ServiceTableFieldID)?.FieldName);
        }
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            ServiceStoreParams param         = (ServiceStoreParams)value;
            DictionaryDAL      DictionaryDal = new DictionaryDAL();

            if (param.IsCustom)
            {
                return(DictionaryDal.FindById((int)param.CustomParamTypeID).ItemName);
            }
            ServiceTableFieldDAL serviceTableFieldDal = new ServiceTableFieldDAL();
            ServiceTableField    field = serviceTableFieldDal.FindById((int)param.ServiceTableFieldID);

            return(DictionaryDal.FindById(field.FieldTypeID).ItemName);
        }
Example #4
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            ServiceStoreParams param = (ServiceStoreParams)value;

            if (param.IsCustom)
            {
                return("-");
            }
            ServiceTableFieldDAL ServiceTableFieldDal = new ServiceTableFieldDAL();
            ServiceTableDAL      ServiceTableDal      = new ServiceTableDAL();
            ServiceTableField    sf = ServiceTableFieldDal.FindById((int)param.ServiceTableFieldID);

            return(ServiceTableDal.FindAll(x => x.ID == sf.TableID).FirstOrDefault().TableName);
        }
        private void AddOutputParam()
        {
            ServiceStoreParams newParam = new ServiceStoreParams()
            {
                ServiceStore = SelectedServiceStore,
                InOut        = false,
            };

            SelectedServiceStore.ServiceStoreParams.Add(newParam);
            ServiceStoreParamAddWindow editWindow = new ServiceStoreParamAddWindow(SelectedServiceStore, newParam)
            {
                Owner = this.SourceWindow
            };

            SwitchWindows(editWindow, true);
            this.OutputFieldList = ReloadOutputFieldList(); NotifyPropertyChanged("OutputFieldList");
        }
 public ServiceStoreParamAddWindow(ServiceStore selectedServiceStore, ServiceStoreParams serviceStoreParam)
 {
     InitializeComponent();
     this.DataContext = new ServiceStoreParamAddViewModel(this, selectedServiceStore, serviceStoreParam);
 }