Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdevgetprod(ref DataRow row, Pdevgetprod entity)
 {
     row.SetField("action", entity.action);
     row.SetField("currentProd", entity.currentProd);
     row.SetField("currentWhse", entity.currentWhse);
     row.SetField("newProd", entity.newProd);
     row.SetField("arpvendno", entity.arpvendno);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Pdevgetprod BuildPdevgetprodFromRow(DataRow row)
        {
            Pdevgetprod entity = new Pdevgetprod();

            entity.action      = row.IsNull("action") ? string.Empty : row.Field <string>("action");
            entity.currentProd = row.IsNull("currentProd") ? string.Empty : row.Field <string>("currentProd");
            entity.currentWhse = row.IsNull("currentWhse") ? string.Empty : row.Field <string>("currentWhse");
            entity.newProd     = row.IsNull("newProd") ? string.Empty : row.Field <string>("newProd");
            entity.arpvendno   = row.IsNull("arpvendno") ? decimal.Zero : row.Field <decimal>("arpvendno");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }