Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCalcsubtotalsresults(ref DataRow row, Calcsubtotalsresults entity)
 {
     row.SetField("totqtyord", entity.totqtyord);
     row.SetField("totqtyshp", entity.totqtyshp);
     row.SetField("totlineamt", entity.totlineamt);
     row.SetField("totweight", entity.totweight);
     row.SetField("totcubes", entity.totcubes);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Calcsubtotalsresults BuildCalcsubtotalsresultsFromRow(DataRow row)
        {
            Calcsubtotalsresults entity = new Calcsubtotalsresults();

            entity.totqtyord  = row.IsNull("totqtyord") ? decimal.Zero : row.Field <decimal>("totqtyord");
            entity.totqtyshp  = row.IsNull("totqtyshp") ? decimal.Zero : row.Field <decimal>("totqtyshp");
            entity.totlineamt = row.IsNull("totlineamt") ? decimal.Zero : row.Field <decimal>("totlineamt");
            entity.totweight  = row.IsNull("totweight") ? decimal.Zero : row.Field <decimal>("totweight");
            entity.totcubes   = row.IsNull("totcubes") ? decimal.Zero : row.Field <decimal>("totcubes");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }