コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApsplookupcriteria(ref DataRow row, Apsplookupcriteria entity)
 {
     row.SetField("Vendno", entity.vendno);
     row.SetField("Whse", entity.whse);
     row.SetField("ProdLine", entity.prodLine);
     row.SetField("Year", entity.year);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Apsplookupcriteria BuildApsplookupcriteriaFromRow(DataRow row)
        {
            Apsplookupcriteria entity = new Apsplookupcriteria();

            entity.vendno           = row.IsNull("Vendno") ? decimal.Zero : row.Field <decimal>("Vendno");
            entity.whse             = row.IsNull("Whse") ? string.Empty : row.Field <string>("Whse");
            entity.prodLine         = row.IsNull("ProdLine") ? string.Empty : row.Field <string>("ProdLine");
            entity.year             = row.IsNull("Year") ? 0 : row.Field <int>("Year");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }