private void AddSuggestActions(ActionsElement actions, HPatternSettings settings,bool trn,bool prt,bool tab)
        {
            foreach (SettingsSuggestActionElement act in settings.SuggestActions)
            {
                if ((act.SuggestSelection && trn == false && prt == false && tab == false)
                    || (act.SuggestTransaction && trn == true)
                    || (act.SuggestPrompt && prt == true)
                    || (act.SuggestViewTab && tab == true))
                {
                    ActionElement action = new ActionElement();
                    action.Name = act.Name;
                    action.Caption = act.Caption;
                    action.Legend = act.Legend;
                    action.Gxobject = act.Gxobject;
                    action.InGrid = act.InGrid;
                    action.MultiRowSelection = act.MultiRowSelection;
                    action.Image = act.Image;
                    action.DisabledImage = act.DisabledImage;
                    action.Tooltip = act.Tooltip;
                    action.Condition = act.Condition;
                    action.ButtonClass = act.ButtonClass;
                    action.EventCode = act.EventCode;
                    action.CodeEnable = act.CodeEnable;
                    action.Position = act.Position;
                    action.Width = act.Width;
                    action.GridHeight = act.GridHeight;
                    action.GridWidth = act.GridWidth;

                    // Parametros
                    foreach (SettingsSuggestParameterElement par in act.Parameters)
                    {
                        ParameterElement pare = new ParameterElement();
                        pare.Name = par.Name;
                        pare.Domain = par.Domain;
                        pare.Null = par.Null;
                        action.Parameters.Add(pare);
                    }

                    actions.Add(action);
                }
            }
        }
 private void AddParameter(IBaseCollection<ParameterElement> parametersElement, string parValue, bool nullAttri)
 {
     ParameterElement parm = new ParameterElement(parValue);
     parm.Null = nullAttri;
     parametersElement.Add(parm);
 }
Example #3
0
 internal void TreeViewAnchor()
 {
     if (Settings.Template.TabFunction == SettingsTemplateElement.TabFunctionValue.TreeViewAnchor)
     {
         if (Levels != null && Levels.Count > 0 && Levels[0].View != null)
         {
             ViewElement view = Levels[0].View;
             ParameterElement par = view.Parameters.FindParameter("&Mode");
             if (par == null) {
                 par = new ParameterElement("&Mode");
                 view.Parameters.Insert(0, par);
             }
         }
     }
 }
        private void AddSuggestParameters(ParametersElement parms, bool trn, bool sel)
        {
            if (settings != null)
            {
                if (settings.SuggestParameters != null)
                {
                    foreach (SettingsSuggestParameterSTElement par in settings.SuggestParameters)
                    {
                        if ((trn && par.ApplyTransaction) || (sel && par.ApplySelection))
                        {

                            ParameterElement parm = new ParameterElement();
                            parm.Name = par.Name;
                            parm.Domain = par.Domain;
                            parm.Null = par.Null;
                            if (parms == null) parms = new ParametersElement();
                            parms.Add(parm);
                        }
                    }
                }

            }
        }
Example #5
0
 internal void addParmlinkCallBack(IParameters objP)
 {
     ParameterElement par = objP.Parameters.FindParameter("&"+PARMCALLBACK);
     if (par == null)
     {
         par = new ParameterElement("&" + PARMCALLBACK);
         par.Domain = Domain.Get(Model, PARMCALLBACK);
         objP.Parameters.Add(par);
     }
 }