Example #1
0
        public static Loadpoquickviewtiessingle BuildLoadpoquickviewtiessingleFromRow(DataRow row)
        {
            Loadpoquickviewtiessingle entity = new Loadpoquickviewtiessingle();

            entity.qtyord             = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.onhand             = row.IsNull("onhand") ? decimal.Zero : row.Field <decimal>("onhand");
            entity.qtyrcv             = row.IsNull("qtyrcv") ? decimal.Zero : row.Field <decimal>("qtyrcv");
            entity.netavail           = row.IsNull("netavail") ? decimal.Zero : row.Field <decimal>("netavail");
            entity.qtycost            = row.IsNull("qtycost") ? decimal.Zero : row.Field <decimal>("qtycost");
            entity.backorder          = row.IsNull("backorder") ? decimal.Zero : row.Field <decimal>("backorder");
            entity.stkunit            = row.IsNull("stkunit") ? string.Empty : row.Field <string>("stkunit");
            entity.onorder            = row.IsNull("onorder") ? decimal.Zero : row.Field <decimal>("onorder");
            entity.duedt              = row.Field <DateTime?>("duedt");
            entity.received           = row.IsNull("received") ? decimal.Zero : row.Field <decimal>("received");
            entity.reasonunavail      = row.IsNull("reasonunavail") ? string.Empty : row.Field <string>("reasonunavail");
            entity.unavail            = row.IsNull("unavail") ? decimal.Zero : row.Field <decimal>("unavail");
            entity.inventorytxthidden = row.Field <bool>("inventorytxthidden");
            entity.backorderhidden    = row.Field <bool>("backorderhidden");
            entity.netavailhidden     = row.Field <bool>("netavailhidden");
            entity.onhandhidden       = row.Field <bool>("onhandhidden");
            entity.onorderhidden      = row.Field <bool>("onorderhidden");
            entity.receivedhidden     = row.Field <bool>("receivedhidden");
            entity.unavailhidden      = row.Field <bool>("unavailhidden");
            return(entity);
        }
Example #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadpoquickviewtiessingle(ref DataRow row, Loadpoquickviewtiessingle entity)
 {
     row.SetField("qtyord", entity.qtyord);
     row.SetField("onhand", entity.onhand);
     row.SetField("qtyrcv", entity.qtyrcv);
     row.SetField("netavail", entity.netavail);
     row.SetField("qtycost", entity.qtycost);
     row.SetField("backorder", entity.backorder);
     row.SetField("stkunit", entity.stkunit);
     row.SetField("onorder", entity.onorder);
     row.SetField("duedt", entity.duedt);
     row.SetField("received", entity.received);
     row.SetField("reasonunavail", entity.reasonunavail);
     row.SetField("unavail", entity.unavail);
     row.SetField("inventorytxthidden", entity.inventorytxthidden);
     row.SetField("backorderhidden", entity.backorderhidden);
     row.SetField("netavailhidden", entity.netavailhidden);
     row.SetField("onhandhidden", entity.onhandhidden);
     row.SetField("onorderhidden", entity.onorderhidden);
     row.SetField("receivedhidden", entity.receivedhidden);
     row.SetField("unavailhidden", entity.unavailhidden);
 }