Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGlopenjournalresults(ref DataRow row, Glopenjournalresults entity)
 {
     row.SetField("g-currproc", entity.gCurrproc);
     row.SetField("g-jrnlno", entity.gJrnlno);
     row.SetField("g-jrnlproc", entity.gJrnlproc);
     row.SetField("g-nopostings", entity.gNopostings);
     row.SetField("g-percal", entity.gPercal);
     row.SetField("g-perfisc", entity.gPerfisc);
     row.SetField("g-period", entity.gPeriod);
     row.SetField("g-postdt", entity.gPostdt);
     row.SetField("g-prfck", entity.gPrfck);
     row.SetField("g-setno", entity.gSetno);
     row.SetField("g-totck", entity.gTotck);
     row.SetField("g-totcr", entity.gTotcr);
     row.SetField("g-totdr", entity.gTotdr);
     row.SetField("g-tothash", entity.gTothash);
     row.SetField("g-transno", entity.gTransno);
     row.SetField("g-year", entity.gYear);
     row.SetField("lBatch", entity.lBatch);
     row.SetField("s-proofcr", entity.sProofcr);
     row.SetField("s-proofdr", entity.sProofdr);
     row.SetField("s-system", entity.sSystem);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
 }
Пример #2
0
        public static Glopenjournalresults BuildGlopenjournalresultsFromRow(DataRow row)
        {
            Glopenjournalresults entity = new Glopenjournalresults();

            entity.gCurrproc   = row.IsNull("g-currproc") ? string.Empty : row.Field <string>("g-currproc");
            entity.gJrnlno     = row.IsNull("g-jrnlno") ? 0 : row.Field <int>("g-jrnlno");
            entity.gJrnlproc   = row.IsNull("g-jrnlproc") ? string.Empty : row.Field <string>("g-jrnlproc");
            entity.gNopostings = row.IsNull("g-nopostings") ? 0 : row.Field <int>("g-nopostings");
            entity.gPercal     = row.IsNull("g-percal") ? 0 : row.Field <int>("g-percal");
            entity.gPerfisc    = row.IsNull("g-perfisc") ? 0 : row.Field <int>("g-perfisc");
            entity.gPeriod     = row.IsNull("g-period") ? 0 : row.Field <int>("g-period");
            entity.gPostdt     = row.Field <DateTime?>("g-postdt");
            entity.gPrfck      = row.IsNull("g-prfck") ? decimal.Zero : row.Field <decimal>("g-prfck");
            entity.gSetno      = row.IsNull("g-setno") ? 0 : row.Field <int>("g-setno");
            entity.gTotck      = row.IsNull("g-totck") ? decimal.Zero : row.Field <decimal>("g-totck");
            entity.gTotcr      = row.IsNull("g-totcr") ? decimal.Zero : row.Field <decimal>("g-totcr");
            entity.gTotdr      = row.IsNull("g-totdr") ? decimal.Zero : row.Field <decimal>("g-totdr");
            entity.gTothash    = row.IsNull("g-tothash") ? decimal.Zero : row.Field <decimal>("g-tothash");
            entity.gTransno    = row.IsNull("g-transno") ? 0 : row.Field <int>("g-transno");
            entity.gYear       = row.IsNull("g-year") ? 0 : row.Field <int>("g-year");
            entity.lBatch      = row.Field <bool>("lBatch");
            entity.sProofcr    = row.IsNull("s-proofcr") ? decimal.Zero : row.Field <decimal>("s-proofcr");
            entity.sProofdr    = row.IsNull("s-proofdr") ? decimal.Zero : row.Field <decimal>("s-proofdr");
            entity.sSystem     = row.IsNull("s-system") ? string.Empty : row.Field <string>("s-system");
            entity.user1       = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2       = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3       = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4       = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5       = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6       = row.Field <decimal?>("user6");
            entity.user7       = row.Field <decimal?>("user7");
            entity.user8       = row.Field <DateTime?>("user8");
            entity.user9       = row.Field <DateTime?>("user9");
            return(entity);
        }