コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelinexrefprodlist(ref DataRow row, Oelinexrefprodlist entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("descrip", entity.descrip);
     row.SetField("unit", entity.unit);
     row.SetField("qtyavail", entity.qtyavail);
     row.SetField("usage", entity.usage);
     row.SetField("surpfl", entity.surpfl);
     row.SetField("rectype", entity.rectype);
     row.SetField("dsplrectype", entity.dsplrectype);
     row.SetField("catfl", entity.catfl);
     row.SetField("sellfirsttype", entity.sellfirsttype);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Oelinexrefprodlist BuildOelinexrefprodlistFromRow(DataRow row)
        {
            Oelinexrefprodlist entity = new Oelinexrefprodlist();

            entity.prod          = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.notesfl       = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.descrip       = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.unit          = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.qtyavail      = row.IsNull("qtyavail") ? decimal.Zero : row.Field <decimal>("qtyavail");
            entity.usage         = row.IsNull("usage") ? decimal.Zero : row.Field <decimal>("usage");
            entity.surpfl        = row.IsNull("surpfl") ? string.Empty : row.Field <string>("surpfl");
            entity.rectype       = row.IsNull("rectype") ? string.Empty : row.Field <string>("rectype");
            entity.dsplrectype   = row.IsNull("dsplrectype") ? string.Empty : row.Field <string>("dsplrectype");
            entity.catfl         = row.IsNull("catfl") ? string.Empty : row.Field <string>("catfl");
            entity.sellfirsttype = row.IsNull("sellfirsttype") ? string.Empty : row.Field <string>("sellfirsttype");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }