예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcepeserialactions(ref DataRow row, Icepeserialactions entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("runno", entity.runno);
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("serialno", entity.serialno);
     row.SetField("unavailfl", entity.unavailfl);
     row.SetField("rectype", entity.rectype);
     row.SetField("incfl", entity.incfl);
     row.SetField("binloc", entity.binloc);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Icepeserialactions BuildIcepeserialactionsFromRow(DataRow row)
        {
            Icepeserialactions entity = new Icepeserialactions();

            entity.cono      = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.runno     = row.IsNull("runno") ? 0 : row.Field <int>("runno");
            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.serialno  = row.IsNull("serialno") ? string.Empty : row.Field <string>("serialno");
            entity.unavailfl = row.Field <bool>("unavailfl");
            entity.rectype   = row.IsNull("rectype") ? string.Empty : row.Field <string>("rectype");
            entity.incfl     = row.IsNull("incfl") ? string.Empty : row.Field <string>("incfl");
            entity.binloc    = row.IsNull("binloc") ? string.Empty : row.Field <string>("binloc");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }