/// <summary> /// SaveAccountActiveStatus /// </summary> /// <param name="AccountModelDTO"></param> /// <returns></returns> public bool SaveMailRecord(MailRecordsModel MailRecordsDTO) { //Rloc, Created, FromName, ProcessorName, FormName, Subject, Team, Company try { mailrecord objmailrecord = new mailrecord(); objmailrecord.RLOC = MailRecordsDTO.RLOC; objmailrecord.Created = MailRecordsDTO.Created; objmailrecord.FromName = MailRecordsDTO.FromName; objmailrecord.ProcessorName = MailRecordsDTO.ProcessorName; objmailrecord.FormName = MailRecordsDTO.FormName; objmailrecord.Subject = MailRecordsDTO.Subject; objmailrecord.Team = MailRecordsDTO.Team; objmailrecord.Company = MailRecordsDTO.Company; wozData.SaveChanges(); return true; } catch { return false; } }
/// <summary> /// LogToQiOnline /// </summary> protected void LogToQiOnline() { try { string TmpRloc; string TmpIPAddress; string TmpProcessorName; string TmpFormName; string TmpSubject; string TmpTeam; string TmpCompany; TmpRloc = GetReference; TmpIPAddress = GetIPAddress(); TmpProcessorName = "DOWNLOAD_TO_CALENDAR"; TmpFormName = ""; TmpSubject = "Download to calendar - " + m_Surname; TmpTeam = ""; TmpCompany = ""; ///////////////////////////// // Insert record to mailrecord before redirecting to generated document logger.Debug("Insert record to mailrecord"); MailRecordsModel objMailRecordsDTO = new MailRecordsModel(); objMailRecordsDTO.RLOC = TmpRloc; objMailRecordsDTO.Created = System.DateTime.UtcNow; objMailRecordsDTO.FromName = TmpIPAddress; objMailRecordsDTO.ProcessorName = TmpProcessorName; objMailRecordsDTO.FormName = TmpFormName; objMailRecordsDTO.Subject = TmpSubject; objMailRecordsDTO.Team = TmpTeam; objMailRecordsDTO.Company = TmpCompany; MailRecordsBAL objMailRecordsBAL = new MailRecordsBAL(SetCurrentSite); objMailRecordsBAL.SaveMailRecord(objMailRecordsDTO); //ChwLib.DatabaseManager.AddMailRecord( // // RLOC / PRN // TmpRloc, // // Created // System.DateTime.UtcNow, // // FromName / To-From // TmpIPAddress, // // ProcessorName // TmpProcessorName, // // FormName / Format-Name // TmpFormName, // // Subject // TmpSubject, // // Team // TmpTeam, // // Company // TmpCompany); } catch { } }
/// <summary> /// SaveAccountActiveStatus /// </summary> /// <param name="AccountModelDTO"></param> /// <returns></returns> public bool SaveMailRecord(MailRecordsModel MailRecordsDTO) { return objMailRecordsDAL.SaveMailRecord(MailRecordsDTO); }