/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPoblanketvalidatesingle(ref DataRow row, Poblanketvalidatesingle entity) { row.SetField("transtype", entity.transtype); row.SetField("vendno", entity.vendno); row.SetField("vendname", entity.vendname); row.SetField("shiptowhse", entity.shiptowhse); row.SetField("shiptoname", entity.shiptoname); row.SetField("ponotesfl", entity.ponotesfl); row.SetField("vendnotesfl", entity.vendnotesfl); }
public static Poblanketvalidatesingle BuildPoblanketvalidatesingleFromRow(DataRow row) { Poblanketvalidatesingle entity = new Poblanketvalidatesingle(); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.vendname = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname"); entity.shiptowhse = row.IsNull("shiptowhse") ? string.Empty : row.Field <string>("shiptowhse"); entity.shiptoname = row.IsNull("shiptoname") ? string.Empty : row.Field <string>("shiptoname"); entity.ponotesfl = row.IsNull("ponotesfl") ? string.Empty : row.Field <string>("ponotesfl"); entity.vendnotesfl = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl"); return(entity); }