void IFieldEditor.InitializeWithField(SPField field) { _interestCalculatorField = field as InterestCalculatorField; if (Page.IsPostBack) { return; } if (_interestCalculatorField != null && _interestCalculatorField.InterestRate != null) { InterestRate.Text = _interestCalculatorField.InterestRate; } }
public void OnSaveChange(Microsoft.SharePoint.SPField field, bool isNewField) { InterestCalculatorField interestCalculatorField = (InterestCalculatorField)field; string interestRate = InterestRate.Text == string.Empty ? "0" : InterestRate.Text; if (isNewField) { interestCalculatorField.UpdateCustomProperty(interestRate); } else { interestCalculatorField.InterestRate = interestRate; } }