NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

// ------------------------------
// 日付毎にXml化を行う
// ------------------------------
dateUnitDocList.ForEach(x =>
{
var alreadyMakeXmlDocNo = new List<string>();

var beltDateString = GetDateStringNoTime(x.Key);
var xDate = new XElement(DocumentXmlConst.DateRoot);
xDate.Add(new XAttribute(DocumentXmlConst.DisplayAttribute, beltDateString));

(x.Value as List<DocumentBase>).ForEach(doc =>
{
// ID 取得
string docID = doc.GetId().ToString();

// 既に登録済みなら読み飛ばし
if (!alreadyMakeXmlDocNo.Contains(docID))
{
// ------------------------------
// Xml作成
// ------------------------------
var xDocument = default(XDocument);
xDocument = Document2Xml(situation, doc, XmlConvertMode.Display, beltDateString, stickies, false, drugColorUtility, migrationDocBodyHtmlDic);
alreadyMakeXmlDocNo.Add(docID);

// ------------------------------
// 親文書のIncludeタグに子文書を生成
// ------------------------------
if (doc.IsMountType())
{
// ------------------------------
// TagMstからタグの情報を取得
// ------------------------------
var docTagList = DocumentProfile.GetMasterData(DocumentConst.DocTagMaster,
new Dictionary<string, object>() { { "RootTagName", doc.GetRootTagName() } },
new List<string>() { "DocTagSequence ASC" });
if (docTagList != null)
{
docTagList.ForEach(docTag =>
{
// ------------------------------
// タグ名を持つエレメントを取得
// ------------------------------
var xDocTagList = XmlUtility.GetElements(xDocument.Root, docTag["TagName"].ToString()).ToList();
if (xDocTagList != null && xDocTagList.Count > 0)
{
xDocTagList.ForEach(xDocTag =>
{
// ------------------------------
// Includeタグ分ループ
// ------------------------------

while (XmlUtility.GetElement(xDocTag, DocumentXmlConst.Include) != null)
{
// Includeタグ
var xElem = XmlUtility.GetElement(xDocTag, DocumentXmlConst.Include);
var docNo = XmlUtility.GetElementValue(xElem, DocumentXmlConst.DocNo);

XmlUtility.RemoveElement(xDocTag, DocumentXmlConst.Include, docNo);

// 指定されたdocListの並び順に従って、子文書をincludeする場合
if (transformCondition.IsIncludeListOrder)
{
var nowDocList = (x.Value as List<DocumentBase>);
var nowDocIndex = nowDocList.IndexOf(doc);

// 処理中の親文書以降のみループ
for (int i = nowDocIndex + 1; i < nowDocList.Count; i++)
{
var cDoc = nowDocList[i];

// 指定された文書番号リスト順で、続く文書がinclude対象であれば
if (!cDoc.IsMountType() && doc.GetParent() == cDoc.GetParent())
{
// ------------------------------
// Includeタグ内の子文書をXml生成
// ------------------------------
if (cDoc.GetDocNo() == docNo)
{
// ------------------------------
// 子文書のXml生成
// ------------------------------
string cDocID = cDoc.GetId().ToString();
if (!alreadyMakeXmlDocNo.Contains(cDocID))
{
// 子文書の更新情報行を非表示判定
bool isUpdateRowHidden = IsUpdateRowHidden(situation, doc, cDoc);

var xCDocument = default(XDocument);
xCDocument = Document2Xml(situation, cDoc, XmlConvertMode.Display, beltDateString, stickies, isUpdateRowHidden, drugColorUtility, migrationDocBodyHtmlDic);

// Includeタグを差し替え
//xElem.ReplaceWith(xCDocument.Root);
xDocTag.Add(xCDocument.Root);

alreadyMakeXmlDocNo.Add(cDocID);
}
}
}
else
{
// 続く文書がinclude対象でなければ、処理終了
break;
}
}
}
else
{
// ------------------------------
// Includeタグ内の子文書をXml生成
// ------------------------------
(x.Value as List<DocumentBase>).Where(y => y.GetDocNo() == docNo).ForEach(cDoc =>
{
// ------------------------------
// 子文書のXml生成
// ------------------------------
string cDocID = cDoc.GetId().ToString();
if (!alreadyMakeXmlDocNo.Contains(cDocID))
{
// 子文書の更新情報行を非表示判定
bool isUpdateRowHidden = IsUpdateRowHidden(situation, doc, cDoc);

var xCDocument = default(XDocument);
xCDocument = Document2Xml(situation, cDoc, XmlConvertMode.Display, beltDateString, stickies, isUpdateRowHidden, drugColorUtility, migrationDocBodyHtmlDic);

// Includeタグを差し替え
//xElem.ReplaceWith(xCDocument.Root);
xDocTag.Add(xCDocument.Root);

alreadyMakeXmlDocNo.Add(cDocID);
}
});
}
}
});
}
});
}
}
xDate.Add(xDocument.Root);
}
});
count += alreadyMakeXmlDocNo.Count();
xRoot.Add(xDate);
});
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.