protected void MailEm(object state) { try { object[] array = state as object[]; SessionHelper h = (SessionHelper)array[0]; string tamplate = (string)array[1]; string vals = (string)array[2]; AdministrationService administrationService = new AdministrationService(new AdministrationRepository(), h); MailEmployeeRecordRequest req = new MailEmployeeRecordRequest(); req.param = vals; req.templateId = tamplate; RecordResponse <MailEmployee> resp = administrationService.ChildGetRecord <MailEmployee>(req); if (!resp.Success) { HttpRuntime.Cache.Insert("ErrorMsgGenEM", resp.Summary); HttpRuntime.Cache.Insert("ErrorLogIdGenEM", resp.LogId); HttpRuntime.Cache.Insert("ErrorErrorCodeGenEM", resp.ErrorCode); } else { if (!string.IsNullOrEmpty(resp.recordId)) { HttpRuntime.Cache.Insert("genEM_RecordId", resp.recordId); } } } catch (Exception exp) { X.Msg.Alert(Resources.Common.Error, exp.Message).Show(); } }