ControllerDataGridDataItemClassValidate Method |
Namespace: SOWIWin.Helper
/// <summary> /// Checks whether records should be created or deleted. This is not supported. /// </summary> /// <returns>Is it data valid?</returns> public override bool Validate() { //* AppModule validation * bool lIsValid = base.Validate(); if (lIsValid) { string lMessage = ""; for (int i = 0; i < this.DataItems.Count; i++) { if (this.DataItems[i].ActionDB == SOWIData.Actions.Create) { //* Create -> Insert * lMessage = "DB Action Create not supported!" + Environment.NewLine; lIsValid = false; } if (this.DataItems[i].ActionDB == SOWIData.Actions.Delete) { //* Delete * lMessage = "DB Action Delete not supported!" + Environment.NewLine; lIsValid = false; } } if (lMessage.Length > 0) { SOWIWin.Helper.Message.Show(lMessage); } } return lIsValid; }