Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCrbankglfetchresults(ref DataRow row, Crbankglfetchresults entity)
 {
     row.SetField("bankno", entity.bankno);
     row.SetField("crbankglacct", entity.crbankglacct);
     row.SetField("crbankglacctdesc", entity.crbankglacctdesc);
     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);
     row.SetField("rowid-crsb", entity.rowidCrsb.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Crbankglfetchresults BuildCrbankglfetchresultsFromRow(DataRow row)
        {
            Crbankglfetchresults entity = new Crbankglfetchresults();

            entity.bankno           = row.IsNull("bankno") ? 0 : row.Field <int>("bankno");
            entity.crbankglacct     = row.IsNull("crbankglacct") ? string.Empty : row.Field <string>("crbankglacct");
            entity.crbankglacctdesc = row.IsNull("crbankglacctdesc") ? string.Empty : row.Field <string>("crbankglacctdesc");
            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");
            entity.rowidCrsb        = row.Field <byte[]>("rowid-crsb").ToStringEncoded();
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }