Esempio n. 1
0
 void IFieldEditor.InitializeWithField(SPField field)
 {
     _interestCalculatorField = field as InterestCalculatorField;
     if (Page.IsPostBack)
     {
         return;
     }
     if (_interestCalculatorField != null && _interestCalculatorField.InterestRate != null)
     {
         InterestRate.Text = _interestCalculatorField.InterestRate;
     }
 }
Esempio n. 2
0
        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;
            }
        }