пример < /strong>: < /p>
Пользователь создает элемент списка и прикрепляет следующие файлы < /p>
< /p>
picture_front.jpg
/>picture_back.png
picture_231.jpg>
теперь в моем приемнике в моем мероприятии возможно, что я сначала получаю «br /back». Прилагается к элементу списка?
Я попытался использовать свойство spfile 'timeecreated' < /strong>, но это также не работает ... они получили одинаковую метку времени

Любые идеи или я делаю что -то не так? />
public override void ItemAdded(SPItemEventProperties properties)
{
SPAttachmentCollection attachments = properties.ListItem.Attachments;
if (attachments.Count > 0)
{
int p = 1;
Dictionary attachementDict = new Dictionary();
try
{
foreach (string attachement in attachments)
{
SPFile attachementFile = properties.ListItem.ParentList.ParentWeb.GetFile(properties.ListItem.Attachments.UrlPrefix + attachement);
string imageUrlPath = properties.WebUrl + attachementFile.ServerRelativeUrl;
string imageTimestamp = attachementFile.TimeCreated.Ticks.ToString();
// This Dict is used lator for sorting
// but at the Moment I get here the error that the same key already exists because of the same timestamp of the files

attachementDict.Add(imageTimestamp, imageUrlPath);
}
}
catch (Exception ex)
{
// SPLog
}
}
Подробнее здесь: https://stackoverflow.com/questions/190 ... ver-in-cor