IRecroGridUpdateRecroGridUpdate Method |
Namespace: Recrovit.RecroGridFramework
bool RecroGridUpdate( IRGDataContext context, RGClientParam param, RGUIMessages messages )
public partial class Person : IRecroGridInitNew, IRecroGridUpdate, IRecroGridDelete { public bool RecroGridDelete(IRGDataContext context, RGClientParam param, RGUIMessages messages) { if (this.Locked) { messages.AddError("A rekord zárolt!"); return false; } return true; } public void RecroGridInitNew(IRGDataContext context, RGClientParam param) { this.PersonType = "SC"; } public bool RecroGridUpdate(IRGDataContext context, RGClientParam param, RGUIMessages messages) { if (string.IsNullOrEmpty(this.FirstName)) { //mezőhöz kapcsolt hibaüzenet RecroDict szótárból messages.AddError(RecroDict.Get(param.HttpContext, "Person.Validation", "FirstName"), RecroGrid.Alias2ClientName(param.RGProperties, "FirstName")); } if (string.IsNullOrEmpty(this.LastName)) { messages.AddError(RecroDict.Get(param.HttpContext, "Person.Validation", "LastName"), RecroGrid.Alias2ClientName(param.RGProperties, "LastName")); } return messages.ErrorCount == 0; } }