/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSasosetupdivnosec(ref DataRow row, Sasosetupdivnosec entity) { row.SetField("divno", entity.divno); row.SetField("descrip", entity.descrip); row.SetField("name", entity.name); row.SetField("addr1", entity.addr1); row.SetField("addr2", entity.addr2); row.SetField("city", entity.city); row.SetField("state", entity.state); row.SetField("zipcd", entity.zipcd); row.SetField("selectedfl", entity.selectedfl); row.SetField("userfield", entity.userfield); }
public static Sasosetupdivnosec BuildSasosetupdivnosecFromRow(DataRow row) { Sasosetupdivnosec entity = new Sasosetupdivnosec(); entity.divno = row.IsNull("divno") ? 0 : row.Field <int>("divno"); entity.descrip = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip"); entity.name = row.IsNull("name") ? string.Empty : row.Field <string>("name"); entity.addr1 = row.IsNull("addr1") ? string.Empty : row.Field <string>("addr1"); entity.addr2 = row.IsNull("addr2") ? string.Empty : row.Field <string>("addr2"); entity.city = row.IsNull("city") ? string.Empty : row.Field <string>("city"); entity.state = row.IsNull("state") ? string.Empty : row.Field <string>("state"); entity.zipcd = row.IsNull("zipcd") ? string.Empty : row.Field <string>("zipcd"); entity.selectedfl = row.Field <bool>("selectedfl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }