コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcepeserialchanges(ref DataRow row, Icepeserialchanges entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("incfl", entity.incfl);
     row.SetField("runno", entity.runno);
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("serialno", entity.serialno);
     row.SetField("serlotty", entity.serlotty);
     row.SetField("unavailfl", entity.unavailfl);
     row.SetField("quantity", entity.quantity);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Icepeserialchanges BuildIcepeserialchangesFromRow(DataRow row)
        {
            Icepeserialchanges entity = new Icepeserialchanges();

            entity.cono      = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.incfl     = row.IsNull("incfl") ? string.Empty : row.Field <string>("incfl");
            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.serlotty  = row.IsNull("serlotty") ? string.Empty : row.Field <string>("serlotty");
            entity.unavailfl = row.Field <bool>("unavailfl");
            entity.quantity  = row.IsNull("quantity") ? decimal.Zero : row.Field <decimal>("quantity");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }