示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcxrefvendlookupresults(ref DataRow row, Icxrefvendlookupresults entity)
 {
     row.SetField("rectype", entity.rectype);
     row.SetField("prod", entity.prod);
     row.SetField("altprod", entity.altprod);
     row.SetField("keyno", entity.keyno);
     row.SetField("price", entity.price);
     row.SetField("unitbuy", entity.unitbuy);
     row.SetField("unitstnd", entity.unitstnd);
     row.SetField("leadtm", entity.leadtm);
     row.SetField("lastchgdt", entity.lastchgdt);
     row.SetField("descrip", entity.descrip);
     row.SetField("descrip3", entity.descrip3);
     row.SetField("brandcode", entity.brandcode);
     row.SetField("mfgprod", entity.mfgprod);
     row.SetField("extproddescrip1", entity.extproddescrip1);
     row.SetField("extproddescrip2", entity.extproddescrip2);
     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-icsec", entity.rowidIcsec.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Icxrefvendlookupresults BuildIcxrefvendlookupresultsFromRow(DataRow row)
        {
            Icxrefvendlookupresults entity = new Icxrefvendlookupresults();

            entity.rectype         = row.IsNull("rectype") ? string.Empty : row.Field <string>("rectype");
            entity.prod            = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.altprod         = row.IsNull("altprod") ? string.Empty : row.Field <string>("altprod");
            entity.keyno           = row.IsNull("keyno") ? decimal.Zero : row.Field <decimal>("keyno");
            entity.price           = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price");
            entity.unitbuy         = row.IsNull("unitbuy") ? string.Empty : row.Field <string>("unitbuy");
            entity.unitstnd        = row.IsNull("unitstnd") ? string.Empty : row.Field <string>("unitstnd");
            entity.leadtm          = row.IsNull("leadtm") ? 0 : row.Field <int>("leadtm");
            entity.lastchgdt       = row.Field <DateTime?>("lastchgdt");
            entity.descrip         = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.descrip3        = row.IsNull("descrip3") ? string.Empty : row.Field <string>("descrip3");
            entity.brandcode       = row.IsNull("brandcode") ? string.Empty : row.Field <string>("brandcode");
            entity.mfgprod         = row.IsNull("mfgprod") ? string.Empty : row.Field <string>("mfgprod");
            entity.extproddescrip1 = row.IsNull("extproddescrip1") ? string.Empty : row.Field <string>("extproddescrip1");
            entity.extproddescrip2 = row.IsNull("extproddescrip2") ? string.Empty : row.Field <string>("extproddescrip2");
            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.rowidIcsec      = row.Field <byte[]>("rowid-icsec").ToStringEncoded();
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }