Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcepadisplayqtysresults(ref DataRow row, Icepadisplayqtysresults entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("unit", entity.unit);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("prodnotes", entity.prodnotes);
     row.SetField("qtyonhand", entity.qtyonhand);
     row.SetField("qtyreservd", entity.qtyreservd);
     row.SetField("qtycommit", entity.qtycommit);
     row.SetField("qtyavail", entity.qtyavail);
     row.SetField("qtyunavail", entity.qtyunavail);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Icepadisplayqtysresults BuildIcepadisplayqtysresultsFromRow(DataRow row)
        {
            Icepadisplayqtysresults entity = new Icepadisplayqtysresults();

            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod       = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.unit       = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.proddesc   = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.prodnotes  = row.IsNull("prodnotes") ? string.Empty : row.Field <string>("prodnotes");
            entity.qtyonhand  = row.IsNull("qtyonhand") ? decimal.Zero : row.Field <decimal>("qtyonhand");
            entity.qtyreservd = row.IsNull("qtyreservd") ? decimal.Zero : row.Field <decimal>("qtyreservd");
            entity.qtycommit  = row.IsNull("qtycommit") ? decimal.Zero : row.Field <decimal>("qtycommit");
            entity.qtyavail   = row.IsNull("qtyavail") ? decimal.Zero : row.Field <decimal>("qtyavail");
            entity.qtyunavail = row.IsNull("qtyunavail") ? decimal.Zero : row.Field <decimal>("qtyunavail");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }