예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcprodlinelookupresults(ref DataRow row, Icprodlinelookupresults entity)
 {
     row.SetField("vendno", entity.vendno);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("name", entity.name);
     row.SetField("whse", entity.whse);
     row.SetField("prodline", entity.prodline);
     row.SetField("descrip", entity.descrip);
     row.SetField("buyer", entity.buyer);
     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-icsl", entity.rowidIcsl.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Icprodlinelookupresults BuildIcprodlinelookupresultsFromRow(DataRow row)
        {
            Icprodlinelookupresults entity = new Icprodlinelookupresults();

            entity.vendno    = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.notesfl   = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.name      = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prodline  = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.descrip   = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.buyer     = row.IsNull("buyer") ? string.Empty : row.Field <string>("buyer");
            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.rowidIcsl = row.Field <byte[]>("rowid-icsl").ToStringEncoded();
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }