Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsebadd(ref DataRow row, Icsebadd entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("bundleid", entity.bundleid);
     row.SetField("quantity", entity.quantity);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Icsebadd BuildIcsebaddFromRow(DataRow row)
        {
            Icsebadd entity = new Icsebadd();

            entity.cono      = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.bundleid  = row.IsNull("bundleid") ? string.Empty : row.Field <string>("bundleid");
            entity.quantity  = row.IsNull("quantity") ? decimal.Zero : row.Field <decimal>("quantity");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }