protected void ADDNewRecordComments(object sender, DirectEventArgs e) { string noteText = e.ExtraParams["noteText"]; X.Call("ClearNoteText"); PostRequest <CaseComment> req = new PostRequest <CaseComment>(); CaseComment note = new CaseComment(); note.recordId = null; note.comment = noteText; note.date = DateTime.Now; note.caseId = Convert.ToInt32(currentCase.Text); req.entity = note; PostResponse <CaseComment> resp = _caseService.ChildAddOrUpdate <CaseComment>(req); if (!resp.Success) { X.Msg.Alert(Resources.Common.Error, GetGlobalResourceObject("Errors", resp.ErrorCode) != null ? GetGlobalResourceObject("Errors", resp.ErrorCode).ToString() + "<br>" + GetGlobalResourceObject("Errors", "ErrorLogId") + resp.LogId : resp.Summary).Show(); } caseComments_RefreshData(Convert.ToInt32(currentCase.Text)); //Reset all values of the relative object }