Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCreateicfuturettsingle(ref DataRow row, Createicfuturettsingle entity)
 {
     row.SetField("unit", entity.unit);
     row.SetField("leaddays", entity.leaddays);
     row.SetField("qtyonhand", entity.qtyonhand);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Createicfuturettsingle BuildCreateicfuturettsingleFromRow(DataRow row)
        {
            Createicfuturettsingle entity = new Createicfuturettsingle();

            entity.unit      = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.leaddays  = row.IsNull("leaddays") ? 0 : row.Field <int>("leaddays");
            entity.qtyonhand = row.IsNull("qtyonhand") ? decimal.Zero : row.Field <decimal>("qtyonhand");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }