Beispiel #1
0
        private void AddVisible_Validator(PfeColumnAttribute col, PfeModelType Type)
        {
            if (col != null)
            {
                if (Type == PfeModelType.Form)
                {
                    col.Validator ??= new PfeValidator {
                        Rules = new List <PfeRule>()
                    };

                    col.Validator.Rules.Add(new PfeRule
                    {
                        ValidatorType = PfeValidatorType.Visible,
                        Condition     = new List <PfeFilterAttribute>
                        {
                            new PfeFilterAttribute
                            {
                                Field = "C_TypBiznisEntity_Kniha_Id",
                                ComparisonOperator = "eq",
                                Value = (int)TypBiznisEntity_KnihaEnum.Terminalove_pokladnicne_doklady
                            }
                        }
                    });
                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// Datovy model pre pohlad
 /// </summary>
 /// <param name="name">Nazov pohladu</param>
 /// <param name="type">Typ pohladu</param>
 /// <param name="rowFilter">Povolenie filtrovania riadkov</param>
 /// <param name="multiSort">Povolenie usporiadania stlpcov</param>
 public PfeDataModel(string name, PfeModelType type, bool showinactions = false, bool rowFilter = true, bool multiSort = true) : this()
 {
     Name             = name;
     Type             = type;
     ShowInActions    = showinactions;
     RowFilterEnabled = rowFilter;
     MultiSortEnabled = multiSort;
 }
        public static void AddTypFirstNazov_Validator(PfeColumnAttribute typFirstNazov, PfeModelType Type)
        {
            if (typFirstNazov != null)
            {
                if (Type != PfeModelType.Form)
                {
                    typFirstNazov.Text = "_TypFirstNazov";
                }
                else
                {
                    typFirstNazov.Validator ??= new PfeValidator {
                        Rules = new List <PfeRule>()
                    };

                    typFirstNazov.Validator.Rules.Add(new PfeRule
                    {
                        ValidatorType = PfeValidatorType.Visible,
                        Condition     = new List <PfeFilterAttribute>
                        {
                            new PfeFilterAttribute
                            {
                                Field = "DatumVytvorenia",
                                ComparisonOperator = "eq",
                                Value = null
                            }
                        }
                    });
                }
            }
        }