Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadunavailttresults(ref DataRow row, Loadunavailttresults entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("reasunavty", entity.reasunavty);
     row.SetField("qtyunavail", entity.qtyunavail);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("arpvendno", entity.arpvendno);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Loadunavailttresults BuildLoadunavailttresultsFromRow(DataRow row)
        {
            Loadunavailttresults entity = new Loadunavailttresults();

            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod       = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.reasunavty = row.IsNull("reasunavty") ? string.Empty : row.Field <string>("reasunavty");
            entity.qtyunavail = row.IsNull("qtyunavail") ? decimal.Zero : row.Field <decimal>("qtyunavail");
            entity.enterdt    = row.Field <DateTime?>("enterdt");
            entity.arpvendno  = row.IsNull("arpvendno") ? decimal.Zero : row.Field <decimal>("arpvendno");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }