/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOpencountspriority(ref DataRow row, Opencountspriority entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("i_priority", entity.iPriority); row.SetField("i_qty", entity.iQty); row.SetField("i_lines", entity.iLines); row.SetField("userfield", entity.userfield); }
public static Opencountspriority BuildOpencountspriorityFromRow(DataRow row) { Opencountspriority entity = new Opencountspriority(); 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.iPriority = row.IsNull("i_priority") ? 0 : row.Field <int>("i_priority"); entity.iQty = row.IsNull("i_qty") ? 0 : row.Field <int>("i_qty"); entity.iLines = row.IsNull("i_lines") ? 0 : row.Field <int>("i_lines"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }