/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromRefreshprodcatresults(ref DataRow row, Refreshprodcatresults entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("prodcat", entity.prodcat); row.SetField("description", entity.description); row.SetField("pick_sequence", entity.pickSequence); row.SetField("addfl", entity.addfl); row.SetField("changefl", entity.changefl); row.SetField("restrictfl", entity.restrictfl); row.SetField("custom_data1", entity.customData1); row.SetField("custom_data2", entity.customData2); row.SetField("custom_data3", entity.customData3); row.SetField("custom_data4", entity.customData4); row.SetField("custom_data5", entity.customData5); row.SetField("userfield", entity.userfield); }
public static Refreshprodcatresults BuildRefreshprodcatresultsFromRow(DataRow row) { Refreshprodcatresults entity = new Refreshprodcatresults(); 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.prodcat = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat"); entity.description = row.IsNull("description") ? string.Empty : row.Field <string>("description"); entity.pickSequence = row.IsNull("pick_sequence") ? 0 : row.Field <int>("pick_sequence"); entity.addfl = row.Field <bool>("addfl"); entity.changefl = row.Field <bool>("changefl"); entity.restrictfl = row.Field <bool>("restrictfl"); entity.customData1 = row.IsNull("custom_data1") ? string.Empty : row.Field <string>("custom_data1"); entity.customData2 = row.IsNull("custom_data2") ? string.Empty : row.Field <string>("custom_data2"); entity.customData3 = row.IsNull("custom_data3") ? string.Empty : row.Field <string>("custom_data3"); entity.customData4 = row.IsNull("custom_data4") ? string.Empty : row.Field <string>("custom_data4"); entity.customData5 = row.IsNull("custom_data5") ? string.Empty : row.Field <string>("custom_data5"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }