Exemplo n.º 1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="tributeId"></param>
 /// <returns></returns>
 public string GetTributeEndDate(int tributeId)
 {
     NotesResource objNoteResource = new NotesResource();
     return objNoteResource.GetTributeEndDate(tributeId);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Method to get the list of notes for the selected tribute
 /// </summary>
 /// <param name="objNote">Note entity conatining tributeId</param>
 /// <returns>List of notes</returns>
 public List<Note> GetTributeNotes(Note objNote)
 {
     NotesResource objNotesResource = new NotesResource();
     object[] param = { objNote };
     return objNotesResource.GetTributeNotes(param);
 }
Exemplo n.º 3
0
 public void GetLastNoteForTribute(object[] objTributeId)
 {
     NotesResource objNoteResource = new NotesResource();
     objNoteResource.GetLastNoteForTribute(objTributeId);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Method to get the note detail based on the selected note
 /// </summary>
 /// <param name="objNote">Note entity containing note id</param>
 /// <returns>Filled note entity with the note details</returns>
 public Note GetNoteDetails(Note objNote)
 {
     NotesResource objNoteResource = new NotesResource();
     object[] param = { objNote };
     return objNoteResource.GetNoteDetail(param);
 }
Exemplo n.º 5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="tributeId"></param>
 /// <returns></returns>
 public bool GetCustomHeaderDetail(int tributeId)
 {
     NotesResource objNoteResource = new NotesResource();
     return objNoteResource.GetCustomHeaderDetail(tributeId);
 }
Exemplo n.º 6
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="tributeId"></param>
 /// <returns></returns>
 public int GetCurrentNotes(int tributeId)
 {
     NotesResource objNoteResource = new NotesResource();
     return objNoteResource.GetCurrentNotes(tributeId);
 }
Exemplo n.º 7
0
 /// <summary>
 /// Method to delete note
 /// </summary>
 /// <param name="objNote">Note entity containing noteid</param>
 public void DeleteNote(Note objNote)
 {
     NotesResource objNoteResource = new NotesResource();
     object[] param = { objNote };
     objNoteResource.Delete(param);
 }
Exemplo n.º 8
0
 /// <summary>
 /// Method to update the note details
 /// </summary>
 /// <param name="objNote">Note entity containing notes data.</param>
 public void UpdateNote(Note objNote)
 {
     NotesResource objNoteResource = new NotesResource();
     object[] param = { objNote };
     objNoteResource.UpdateRecord(param);
 }
Exemplo n.º 9
0
        /// <summary>
        /// Method to send the request to Notes resource for the record insertion.
        /// </summary>
        /// <param name="objVid">Filled Notes Entity</param>
        /// <returns>Object containing the Identity or Error Message</returns>
        public void SaveNote(Note objNote)
        {
            NotesResource objNotesManager = new NotesResource();
            TributeResource objTributeResource = new TributeResource();
            Tributes objTribute = new Tributes();
            object[] param = { objNote };
            object noteId = objNotesManager.InsertDataAndReturnId(param);
            objNote.NotesId = int.Parse(noteId.ToString());
            //to send email
            objTribute.TributeId = int.Parse(objNote.UserTributeId.ToString());
            objTribute.TypeDescription = objNote.ModuleTypeName;
            object[] paramMail = { objTribute };
            List<UserInfo> objUser = objTributeResource.GetTributeAdministrators(paramMail);
            if (objUser.Count > 0)
            {
                SendEmail(objUser, objNote);
            }

            //Function to send the mail to the list of users who have added the Tribute in their list of favourites
            List<UserInfo> objUserFav = objTributeResource.GetFavouriteTributeUsers(paramMail);
            if (objUserFav.Count > 0)
            {
                //As per discussion with Rupendra: will send the mail in "To" field.
                //ie a comma separated list of users in the "to" field
                SendEmail(objUserFav, objNote);
            }
        }