Beispiel #1
0
 public Note(Data.SQL.Note n)
 {
     NoteText = HttpUtility.UrlDecode(n.Content.Replace("<![CDATA[", "").Replace("]]>", "").Replace("\n", "<br />"), System.Text.Encoding.Default);
     Date     = n.DateTime;
     try
     {
         User = ADUtils.FindUserInfos(n.Username)[0].DisplayName;
     }
     catch { User = "******"; }
 }
Beispiel #2
0
        public Note(Data.SQL.Note n)
        {
            NoteText = HttpUtility.UrlDecode(n.Content.Replace("<![CDATA[", "").Replace("]]>", "").Replace("\n", "<br />"), System.Text.Encoding.Default);
            Date     = n.DateTime.ToString("dd/MM/yy HH:mm");
            Username = n.Username;
            try
            {
                DisplayName = ADUtils.FindUserInfos(n.Username)[0].DisplayName;
            }
            catch { DisplayName = "UNKNOWN"; }
            Hide = n.Hide;
            Id   = n.Id;
            List <Attachment> attachments = new List <Attachment>();

            foreach (Data.SQL.NoteFile nf in n.NoteFiles)
            {
                attachments.Add(new Attachment {
                    Name = nf.FileName, CType = nf.ContentType
                });
            }
            Attachments = attachments.ToArray();
        }