private EbFormHelper()
 {
     evaluator = new EbSciptEvaluator
     {
         OptionScriptNeedSemicolonAtTheEndOfLastExpression = false
     };
 }
Beispiel #2
0
        public DataGridRowHelper(EbMobileDataGrid dataGrid)
        {
            bool initEvaluator = false;

            DataGrid = dataGrid;

            if (!string.IsNullOrWhiteSpace(DataGrid?.RowColorExpr?.Code))
            {
                string script = DataGrid.RowColorExpr.GetCode();
                RowColorExprCode = GetComputedExpression(script);
                InitColumnDictOriginal();
                initEvaluator = true;
            }
            if (!string.IsNullOrWhiteSpace(DataGrid?.PersistRowOnlyIf?.Code))
            {
                string script = DataGrid.PersistRowOnlyIf.GetCode();
                PersistRowExprCode = GetComputedExpression(script);
                initEvaluator      = true;
            }

            if (initEvaluator)
            {
                evaluator = new EbSciptEvaluator
                {
                    OptionScriptNeedSemicolonAtTheEndOfLastExpression = false
                };

                ColumnDictionary = new Dictionary <string, MobileTableColumn>();
                foreach (EbMobileControl ctrl in DataGrid.ChildControls)
                {
                    ColumnDictionary.Add(ctrl.Name, new MobileTableColumn(ctrl.Name, ctrl.EbDbType, null));
                }
                evaluator.SetVariable("form", new EbDataGridEvaluator(ColumnDictionary));
            }
        }
Beispiel #3
0
        private EbListHelper()
        {
            evaluator = new EbSciptEvaluator
            {
                OptionScriptNeedSemicolonAtTheEndOfLastExpression = false
            };

            evaluator.Context = context = new EbListEvaluator();
        }