using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web.UI; using System.Reflection; using Bowin.Common.Utility; namespace Bowin.Common { public class BindingMapping { public Control Control { get; set; } public PropertyInfo ControlValueProperty { get; set; } public PropertyInfo DataSourceProperty { get; set; } public bool AutomaticBind { get; set; } public string FormatString { get; set; } public BindingMapping(Control control, PropertyInfo controlValueProperty, PropertyInfo dataSourceProperty) { Guard.ArgumentNotNullOrEmpty(control, "control"); Guard.ArgumentNotNullOrEmpty(controlValueProperty, "controlValueProperty"); Guard.ArgumentNotNullOrEmpty(dataSourceProperty, "dataSourceProperty"); this.Control = control; this.ControlValueProperty = controlValueProperty; this.DataSourceProperty = dataSourceProperty; this.AutomaticBind = true; } } }