示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIccataloglookupcriteria(ref DataRow row, Iccataloglookupcriteria entity)
 {
     row.SetField("catalog", entity.catalog);
     row.SetField("vendno", entity.vendno);
     row.SetField("prodline", entity.prodline);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("keywords", entity.keywords);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Iccataloglookupcriteria BuildIccataloglookupcriteriaFromRow(DataRow row)
        {
            Iccataloglookupcriteria entity = new Iccataloglookupcriteria();

            entity.catalog          = row.IsNull("catalog") ? string.Empty : row.Field <string>("catalog");
            entity.vendno           = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.prodline         = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.prodcat          = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.keywords         = row.IsNull("keywords") ? string.Empty : row.Field <string>("keywords");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }