public void Save() { FastTrackPage page = this.Page as FastTrackPage; if (page != null) { PropertyInfo property = page.GetPropertyInfo(propertyName); if (property != null) { if (page.IsReadOnlyProperty(property.Name)) { return; } } try { object obj = page.SelectedObject; if (obj != null) { if (property != null) { Type type = property.PropertyType; page.SetPropertyValue(propertyName, Convert.ChangeType(this.Text, type)); } } } catch (Exception ex) { throw ex; } } }
protected override void OnClick(EventArgs e) { base.OnClick(e); FastTrackPage page = this.Page as FastTrackPage; if (page != null) { PropertyInfo property = page.GetPropertyInfo(page.SelectedPropertyName); if (property != null) { if (page.IsListProperty(property.Name)) { IList list = (IList)page.GetPropertyValue(property.Name); list.Add(obj); } else { page.SetPropertyValue(property.Name, obj); } page.SaveObject(page.SelectedObject); page.Response.Redirect(page.GetEditUrl(page.SelectedObject, "")); } } }
public void Save() { FastTrackPage page = this.Page as FastTrackPage; if (page != null) { PropertyInfo property = page.GetPropertyInfo(propertyName); if (property != null) { if (page.IsReadOnlyProperty(property.Name)) return; } page.SetPropertyValue(propertyName, this.SelectedDate); } }
public void Save() { FastTrackPage page = this.Page as FastTrackPage; if (page != null) { PropertyInfo property = page.GetPropertyInfo(propertyName); if (property != null) { if (page.IsReadOnlyProperty(property.Name)) { return; } } page.SetPropertyValue(propertyName, Enum.Parse(property.PropertyType, this.SelectedItem.Text)); } }