Exemple #1
0
        //Gets the default value set from MasterColumn then assign it to controls upon creating new transaction
        private void AssignControlsDefaultValue()
        {
            Control control;

            foreach (JkMasterColumn column in MasterColumns)
            {
                column.Value = null;
                if (!String.IsNullOrWhiteSpace(column.ControlName))
                {
                    control = Controls.Find(column.ControlName, true).First();

                    if (String.IsNullOrWhiteSpace(column.DefaultValue))
                    {
                        IAppHandler.ClearControlsValue(control);
                    }
                    else
                    {
                        IAppHandler.SetControlsValue(control, IAppHandler.ConvertMaskValue(column.DefaultValue));
                    }
                }
            }
        }