Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCcwavelist(ref DataRow row, Ccwavelist entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("wave_id", entity.waveId);
     row.SetField("id", entity.id);
     row.SetField("cycle_string", entity.cycleString);
     row.SetField("requested", entity.requested);
     row.SetField("started", entity.started);
     row.SetField("completed", entity.completed);
     row.SetField("emp_num", entity.empNum);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Ccwavelist BuildCcwavelistFromRow(DataRow row)
        {
            Ccwavelist entity = new Ccwavelist();

            entity.coNum       = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num");
            entity.whNum       = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num");
            entity.waveId      = row.IsNull("wave_id") ? 0 : row.Field <int>("wave_id");
            entity.id          = row.IsNull("id") ? 0 : row.Field <int>("id");
            entity.cycleString = row.IsNull("cycle_string") ? string.Empty : row.Field <string>("cycle_string");
            entity.requested   = row.IsNull("requested") ? string.Empty : row.Field <string>("requested");
            entity.started     = row.IsNull("started") ? string.Empty : row.Field <string>("started");
            entity.completed   = row.IsNull("completed") ? string.Empty : row.Field <string>("completed");
            entity.empNum      = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_num");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }