示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeipaltprodloadresults(ref DataRow row, Oeipaltprodloadresults entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("rectype", entity.rectype);
     row.SetField("altprod", entity.altprod);
     row.SetField("altprodnote", entity.altprodnote);
     row.SetField("descrip", entity.descrip);
     row.SetField("qtyavail", entity.qtyavail);
     row.SetField("unit", entity.unit);
 }
示例#2
0
        public static Oeipaltprodloadresults BuildOeipaltprodloadresultsFromRow(DataRow row)
        {
            Oeipaltprodloadresults entity = new Oeipaltprodloadresults();

            entity.cono        = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.rectype     = row.IsNull("rectype") ? string.Empty : row.Field <string>("rectype");
            entity.altprod     = row.IsNull("altprod") ? string.Empty : row.Field <string>("altprod");
            entity.altprodnote = row.IsNull("altprodnote") ? string.Empty : row.Field <string>("altprodnote");
            entity.descrip     = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.qtyavail    = row.IsNull("qtyavail") ? 0 : row.Field <int>("qtyavail");
            entity.unit        = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            return(entity);
        }