/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromAosystemrptitemo(ref DataRow row, Aosystemrptitemo entity) { row.SetField("iNumber", entity.iNumber); row.SetField("OptionNm", entity.optionNm); row.SetField("EditType2", entity.editType2); row.SetField("ORequireFl", entity.oRequireFl); row.SetField("OfLength", entity.ofLength); row.SetField("optdef", entity.optdef); row.SetField("optvaluea", entity.optvaluea); row.SetField("optvalueb", entity.optvalueb); row.SetField("optvaluec", entity.optvaluec); row.SetField("optvalued", entity.optvalued); row.SetField("optvaluee", entity.optvaluee); row.SetField("userfield", entity.userfield); }
public static Aosystemrptitemo BuildAosystemrptitemoFromRow(DataRow row) { Aosystemrptitemo entity = new Aosystemrptitemo(); entity.iNumber = row.IsNull("iNumber") ? 0 : row.Field <int>("iNumber"); entity.optionNm = row.IsNull("OptionNm") ? string.Empty : row.Field <string>("OptionNm"); entity.editType2 = row.IsNull("EditType2") ? string.Empty : row.Field <string>("EditType2"); entity.oRequireFl = row.Field <bool>("ORequireFl"); entity.ofLength = row.IsNull("OfLength") ? 0 : row.Field <int>("OfLength"); entity.optdef = row.IsNull("optdef") ? string.Empty : row.Field <string>("optdef"); entity.optvaluea = row.IsNull("optvaluea") ? string.Empty : row.Field <string>("optvaluea"); entity.optvalueb = row.IsNull("optvalueb") ? string.Empty : row.Field <string>("optvalueb"); entity.optvaluec = row.IsNull("optvaluec") ? string.Empty : row.Field <string>("optvaluec"); entity.optvalued = row.IsNull("optvalued") ? string.Empty : row.Field <string>("optvalued"); entity.optvaluee = row.IsNull("optvaluee") ? string.Empty : row.Field <string>("optvaluee"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }