コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIccataloglookupresults(ref DataRow row, Iccataloglookupresults entity)
 {
     row.SetField("catalog", entity.catalog);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("prodline", entity.prodline);
     row.SetField("vendno", entity.vendno);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("descrip", entity.descrip);
     row.SetField("descrip3", entity.descrip3);
     row.SetField("mfgprod", entity.mfgprod);
     row.SetField("brandcode", entity.brandcode);
     row.SetField("altprodgrp", entity.altprodgrp);
     row.SetField("msdsfl", entity.msdsfl);
     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-icsc", entity.rowidIcsc.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Iccataloglookupresults BuildIccataloglookupresultsFromRow(DataRow row)
        {
            Iccataloglookupresults entity = new Iccataloglookupresults();

            entity.catalog    = row.IsNull("catalog") ? string.Empty : row.Field <string>("catalog");
            entity.notesfl    = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.prodline   = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.vendno     = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.prodcat    = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.descrip    = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.descrip3   = row.IsNull("descrip3") ? string.Empty : row.Field <string>("descrip3");
            entity.mfgprod    = row.IsNull("mfgprod") ? string.Empty : row.Field <string>("mfgprod");
            entity.brandcode  = row.IsNull("brandcode") ? string.Empty : row.Field <string>("brandcode");
            entity.altprodgrp = row.IsNull("altprodgrp") ? string.Empty : row.Field <string>("altprodgrp");
            entity.msdsfl     = row.Field <bool>("msdsfl");
            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.rowidIcsc  = row.Field <byte[]>("rowid-icsc").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }