Beispiel #1
0
 /// <summary>
 /// Takes a collection of ValidationErrors and assigns it to the
 /// matching controls. These controls must match in signature as follows:
 /// Must have the same name as the field and a 3 letter prefix. For example,
 /// 
 /// txtCompany - matches company field
 /// cmbCountry - matches the Country field
 /// </summary>
 /// <returns></returns>
 public void AddValidationErrorsToBindingErrors(Westwind.BusinessObjects.ValidationErrorCollection Errors)
 {
     foreach (Westwind.BusinessObjects.ValidationError Error in Errors)
     {
         Control ctl = wwWebUtils.FindControlRecursive(this.Page.Form,Error.ControlID);
         this.AddBindingError(Error.Message,ctl);
     }
 }
Beispiel #2
0
 protected override void OnInitialize(Westwind.Utilities.Configuration.IConfigurationProvider provider, string sectionName, object configData)
 {
     sectionName = String.Empty;    // 預設的 sectionName 就是這個類別的名稱: 'AppConfig',這裡改寫成空自串,表示要使用 appSettings 區段.
     base.OnInitialize(provider, sectionName, configData);
 }