private void SetControlValues(EbDataRow masterRow)
        {
            foreach (var pair in this.Form.ControlDictionary)
            {
                EbMobileControl ctrl = pair.Value;
                object          data = masterRow[ctrl.Name];
                try
                {
                    if (ctrl is IFileUploadControl)
                    {
                        this.SetFileData(ctrl, data);
                    }
                    else if (ctrl is ILinesEnabled line)
                    {
                        EbDataTable lines = this.formData.Tables.Find(table => table.TableName == line.TableName);
                        ctrl.SetValue(lines);
                    }
                    else
                    {
                        ctrl.SetValue(data);
                    }

                    if (this.IsEditButtonVisible)
                    {
                        ctrl.SetAsReadOnly(true);
                    }
                }
                catch (Exception ex)
                {
                    EbLog.Error("Error when setting value to controls on edit");
                    EbLog.Error(ex.Message);
                }
            }
        }
        private void EvaluateDisableExpr(EbMobileControl ctrl, string parent)
        {
            string expr = ctrl.DisableExpr.GetCode();

            string computed = GetComputedExpression(expr, ctrl.Name, parent);

            try
            {
                bool value = evaluator.Execute <bool>(computed);
                ctrl.SetAsReadOnly(value);
            }
            catch (Exception ex)
            {
                EbLog.Info($"Disable script evaluation error in control '{ctrl.Name}', considering as false");
                EbLog.Error(ex.Message);

                ctrl.SetAsReadOnly(false);
            }
        }