Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPorrarreptcombinqsingle(ref DataRow row, Porrarreptcombinqsingle entity)
 {
     row.SetField("dTotalLineAmount", entity.dTotalLineAmount);
     row.SetField("dTotalWeight", entity.dTotalWeight);
     row.SetField("dTotalCubes", entity.dTotalCubes);
     row.SetField("dTotalQtyOrdered", entity.dTotalQtyOrdered);
     row.SetField("targetheading", entity.targetheading);
     row.SetField("targetpctheading", entity.targetpctheading);
     row.SetField("dTargetBuy", entity.dTargetBuy);
     row.SetField("dTargetBuy-Pct", entity.dTargetBuyPct);
     row.SetField("cTargetBuy-Fl", entity.cTargetBuyFl);
 }
Esempio n. 2
0
        public static Porrarreptcombinqsingle BuildPorrarreptcombinqsingleFromRow(DataRow row)
        {
            Porrarreptcombinqsingle entity = new Porrarreptcombinqsingle();

            entity.dTotalLineAmount = row.IsNull("dTotalLineAmount") ? decimal.Zero : row.Field <decimal>("dTotalLineAmount");
            entity.dTotalWeight     = row.IsNull("dTotalWeight") ? decimal.Zero : row.Field <decimal>("dTotalWeight");
            entity.dTotalCubes      = row.IsNull("dTotalCubes") ? decimal.Zero : row.Field <decimal>("dTotalCubes");
            entity.dTotalQtyOrdered = row.IsNull("dTotalQtyOrdered") ? decimal.Zero : row.Field <decimal>("dTotalQtyOrdered");
            entity.targetheading    = row.IsNull("targetheading") ? string.Empty : row.Field <string>("targetheading");
            entity.targetpctheading = row.IsNull("targetpctheading") ? string.Empty : row.Field <string>("targetpctheading");
            entity.dTargetBuy       = row.IsNull("dTargetBuy") ? decimal.Zero : row.Field <decimal>("dTargetBuy");
            entity.dTargetBuyPct    = row.IsNull("dTargetBuy-Pct") ? decimal.Zero : row.Field <decimal>("dTargetBuy-Pct");
            entity.cTargetBuyFl     = row.IsNull("cTargetBuy-Fl") ? string.Empty : row.Field <string>("cTargetBuy-Fl");
            return(entity);
        }