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