Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCheckprodxrefresults(ref DataRow row, Checkprodxrefresults 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("catfl", entity.catfl);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Checkprodxrefresults BuildCheckprodxrefresultsFromRow(DataRow row)
        {
            Checkprodxrefresults entity = new Checkprodxrefresults();

            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.catfl     = row.IsNull("catfl") ? string.Empty : row.Field <string>("catfl");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }