/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromReptwizardvalsapbva(ref DataRow row, Reptwizardvalsapbva entity) { row.SetField("currproc", entity.currproc); row.SetField("vano", entity.vano); row.SetField("vasuf", entity.vasuf); row.SetField("seqno", entity.seqno); row.SetField("sctntype", entity.sctntype); row.SetField("sctncode", entity.sctncode); row.SetField("descrip", entity.descrip); row.SetField("vatype", entity.vatype); row.SetField("statustype", entity.statustype); }
public static Reptwizardvalsapbva BuildReptwizardvalsapbvaFromRow(DataRow row) { Reptwizardvalsapbva entity = new Reptwizardvalsapbva(); entity.currproc = row.IsNull("currproc") ? string.Empty : row.Field <string>("currproc"); entity.vano = row.IsNull("vano") ? 0 : row.Field <int>("vano"); entity.vasuf = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.sctntype = row.IsNull("sctntype") ? string.Empty : row.Field <string>("sctntype"); entity.sctncode = row.IsNull("sctncode") ? string.Empty : row.Field <string>("sctncode"); entity.descrip = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip"); entity.vatype = row.IsNull("vatype") ? string.Empty : row.Field <string>("vatype"); entity.statustype = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype"); return(entity); }