Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadwtlinehistoryresults(ref DataRow row, Loadwtlinehistoryresults entity)
 {
     row.SetField("wtsuf", entity.wtsuf);
     row.SetField("cstage", entity.cstage);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("orderdt", entity.orderdt);
     row.SetField("shipdt", entity.shipdt);
     row.SetField("receiptdt", entity.receiptdt);
     row.SetField("unit", entity.unit);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("qtyrcv", entity.qtyrcv);
     row.SetField("lassign", entity.lassign);
     row.SetField("qtyunavail", entity.qtyunavail);
 }
Пример #2
0
        public static Loadwtlinehistoryresults BuildLoadwtlinehistoryresultsFromRow(DataRow row)
        {
            Loadwtlinehistoryresults entity = new Loadwtlinehistoryresults();

            entity.wtsuf      = row.IsNull("wtsuf") ? 0 : row.Field <int>("wtsuf");
            entity.cstage     = row.IsNull("cstage") ? string.Empty : row.Field <string>("cstage");
            entity.enterdt    = row.Field <DateTime?>("enterdt");
            entity.orderdt    = row.Field <DateTime?>("orderdt");
            entity.shipdt     = row.Field <DateTime?>("shipdt");
            entity.receiptdt  = row.Field <DateTime?>("receiptdt");
            entity.unit       = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.qtyord     = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.qtyship    = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.qtyrcv     = row.IsNull("qtyrcv") ? decimal.Zero : row.Field <decimal>("qtyrcv");
            entity.lassign    = row.Field <bool>("lassign");
            entity.qtyunavail = row.IsNull("qtyunavail") ? decimal.Zero : row.Field <decimal>("qtyunavail");
            return(entity);
        }