Beispiel #1
0
        private void CreateDocumentInst(DocumentTypeId documentTypeId)
        {
/*			Document doc=CreateDocument(documentTypeId);
 *                      if(doc!=null)
 *                      {
 *                      }*/
        }
        public Document(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);

            id             = gr.GetInt32();
            date           = gr.GetDateTime();
            userId         = gr.GetInt32();
            documentTypeId = (DocumentTypeId)gr.GetInt32();
            completed      = gr.GetBoolean();
            storekeeperId  = gr.GetInt32();
            nDays          = gr.GetInt32();
            documentData   = DocumentData.DeserializeString(gr.GetString());
        }
 public void NormalizeValues()
 {
     CourtOrganizationId = CourtOrganizationId.EmptyToNull();
     DocumentDirectionId = DocumentDirectionId.EmptyToNull();
     DocumentKindId      = DocumentKindId.EmptyToNull();
     DocumentGroupId     = DocumentGroupId.EmptyToNull();
     DocumentTypeId      = DocumentTypeId.EmptyToNull();
     DocumentNumber      = DocumentNumber.EmptyToNull();
     DocumentYear        = DocumentYear.EmptyToNull();
     DateTo       = DateTo.MakeEndDate();
     PersonName   = PersonName.EmptyToNull();
     PersonUIC    = PersonUIC.EmptyToNull();
     PersonRoleId = PersonRoleId.EmptyToNull();
 }
Beispiel #4
0
        public Document(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);
            int          i  = 0;

            id             = dr.GetInt32(i++);
            date           = dr.GetDateTime(i++);
            userId         = dr.GetInt32(i++);
            documentTypeId = (DocumentTypeId)dr.GetInt32(i++);
            completed      = dr.GetBoolean(i++);
            storekeeperId  = dr.GetInt32(i++);
            nDays          = dr.GetInt32(i++);
            documentData   = DocumentData.Create(gr.GetString(i++));
        }
Beispiel #5
0
 public static Document CreateDocument(DocumentTypeId documentTypeId)
 {
     try
     {
         using (WaitCursor wc = new WaitCursor())
         {
             Document doc = new Document(documentTypeId);
             if (OpenDocument(doc))
             {
                 return(doc);
             }
         }
     }
     catch (Exception ex)
     {
         Log.Exception(ex);
     }
     return(null);
 }
Beispiel #6
0
 public Document(DocumentTypeId documentTypeId)
 {
     this.documentTypeId = documentTypeId;
     documentData        = new DocumentData();
 }