예제 #1
0
 public Document(SqlTransaction trans, int id, string userName) : this(userName)
 {
     Init(trans, id);
     if (ExternalSource.IsExist(trans, id))
     {
         ExternalSource = new ExternalSource(trans, id, userName);
     }
     if (Source.IsExist(trans, id))
     {
         Source = new Source(trans, id, userName);
     }
     if (Destination.IsExist(trans, id))
     {
         Destination = new Destination(trans, id, userName);
     }
     Department = new Department(trans, DepartmentID, userName);
     DocumentCode dc = new DocumentCode(trans, CodeID, userName);
     CodeName = dc.Name;
     Code     = dc.Code;
     Files    = DocumentFile.GetList(trans, id);
     Labels   = DocumentLabel.GetDocumentLabelIds(trans, id);
 }