/// <summary> /// Occurs when a new line is added to the document on the Front-End /// </summary> /// <param name="doc">Doc Object</param> /// <param name="lineNumber">Number of the added line</param> /// <returns>Returns an Object of Type Report. If the object is not empy the operation can be canceled and throw back an error message to the user</returns> public Facades.Base.Report OnDocDetailAdding(object doc, int?lineNumber) { //In this example we will return an error message to the user Facades.Base.Report response = new Facades.Base.Report(); Facades.Base.Information info = new Facades.Base.Information(); info.Type = Facades.Base.InformationType.Error; info.Message = "It was not possible to add the new line to the document."; response.AddInformation(info); return(response); }
/// <summary> /// Occurs when the document is canceled or all the lines are removed /// </summary> /// <param name="doc">Doc Object</param> /// <returns>Returns an Object of Type Report. If the object is not empy the operation can be canceled and throw back an error message to the user</returns> public Facades.Base.Report OnDocCanceled(object doc) { //In this example we will return an error message to the user Facades.Base.Report response = new Facades.Base.Report(); Facades.Base.Information info = new Facades.Base.Information(); info.Type = Facades.Base.InformationType.Error; info.Message = "It is not possible to cancel the document"; response.AddInformation(info); return(response); }