Example #1
0
        private void criteriaInitFunc(CCriteriaBase cb)
        {
            CComboConfig  cfg = (CComboConfig)comboTypeConfigs[ComboLoadType];
            CCriteriaBase cr  = (CCriteriaBase)Activator.CreateInstance(Type.GetType(cfg.ScreenCriteriaClassName));

            cb.Init(cfg.Type);
        }
Example #2
0
        private void mnuMasterRefAdd_Click(object sender, RoutedEventArgs e)
        {
            CComboConfig cfg = (CComboConfig)comboTypeConfigs[ComboLoadType];
            ObservableCollection <MBaseModel> arr = new ObservableCollection <MBaseModel>();
            MasterRefEnum rt = (MasterRefEnum)int.Parse(cfg.Type);

            //WinAddEditMasterRef w = new WinAddEditMasterRef(rt);
            //w.Caption = (String)(sender as MenuItem).Header + " " + Caption;
            //w.SetMasterRefType(rt);
            //w.Mode = "A";
            //w.ParentItemSource = arr;
            //w.ShowDialog();

            String        caption = CLanguage.getValue("add") + " " + Caption;
            CWinLoadParam param   = new CWinLoadParam();

            param.Caption           = caption;
            param.GenericType       = cfg.Type;
            param.Mode              = "A";
            param.ParentItemSources = arr;
            Boolean isOK = FactoryWindow.ShowWindow("WinAddEditMasterRef", param);

            if (isOK)
            {
                CMasterReference.LoadAllMasterRefItems(OnixWebServiceAPI.GetAllMasterRefList, rt);
            }
        }
Example #3
0
        private void addComboTypeConfig(ComboLoadType ltype, String crName, String type)
        {
            CComboConfig cfg = new CComboConfig();

            cfg.ScreenCriteriaClassName = FactoryCriteria.GetFqdnClassName(crName); //"Onix.ClientCenter.Criteria." + crName;
            cfg.Type = type;

            comboTypeConfigs.Add(ltype, cfg);
        }
Example #4
0
        private void mnuSearch_Click(object sender, RoutedEventArgs e)
        {
            CComboConfig  cfg = (CComboConfig)comboTypeConfigs[ComboLoadType];
            CCriteriaBase cr  = (CCriteriaBase)Activator.CreateInstance(Type.GetType(cfg.ScreenCriteriaClassName));

            cr.SetActionEnable(false);
            criteriaInitFunc(cr);

            WinLookupSearch2 w = new WinLookupSearch2(cr, Caption);

            w.ShowDialog();

            if (w.IsOK)
            {
                this.selectedObject = w.ReturnedObj;
                updateGui(this);
            }
        }