Adf.Web.Binding.WebBinder.Persist C# (CSharp) Method

Persist() public method

Persists the data of the specified System.Web.UI.Control to the specified business object.
public Persist ( object bindableObject, object control ) : void
bindableObject object The business object where to persist.
control object The , the data of which is to persist.
return void
        public void Persist(object bindableObject, object control, params object[] p)
        {
            Control c = control as Control;
            if (c == null || bindableObject == null)
                return;

            string domainobject = bindableObject.GetType().Name;
            PropertyInfo[] properties = bindableObject.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public);

            Dictionary<string, Control> dictionary = c.GetControls();

            foreach (PropertyInfo pi in properties)
            {
                foreach (string key in _persisters.Keys)
                {
                    string name = key + domainobject + pi.Name;

                    if (!dictionary.ContainsKey(name)) continue;

                    foreach (IControlPersister persister in _persisters[key])
                    {
                        persister.Persist(bindableObject, pi, dictionary[name]);
                    }
                }
            }
        }