/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSwjobtypelookupresults(ref DataRow row, Swjobtypelookupresults entity) { row.SetField("jobtype", entity.jobtype); row.SetField("descrip", entity.descrip); row.SetField("oetype", entity.oetype); row.SetField("prodcat", entity.prodcat); row.SetField("claimtype", entity.claimtype); row.SetField("chargecode", entity.chargecode); row.SetField("appearson", entity.appearson); row.SetField("printpricefl", entity.printpricefl); row.SetField("user1", entity.user1); row.SetField("user2", entity.user2); row.SetField("user3", entity.user3); row.SetField("user4", entity.user4); row.SetField("user5", entity.user5); row.SetField("user6", entity.user6); row.SetField("user7", entity.user7); row.SetField("user8", entity.user8); row.SetField("user9", entity.user9); row.SetField("rowid-swsj", entity.rowidSwsj.ToByteArray()); }
public static Swjobtypelookupresults BuildSwjobtypelookupresultsFromRow(DataRow row) { Swjobtypelookupresults entity = new Swjobtypelookupresults(); entity.jobtype = row.IsNull("jobtype") ? string.Empty : row.Field <string>("jobtype"); entity.descrip = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip"); entity.oetype = row.IsNull("oetype") ? string.Empty : row.Field <string>("oetype"); entity.prodcat = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat"); entity.claimtype = row.IsNull("claimtype") ? string.Empty : row.Field <string>("claimtype"); entity.chargecode = row.IsNull("chargecode") ? string.Empty : row.Field <string>("chargecode"); entity.appearson = row.IsNull("appearson") ? string.Empty : row.Field <string>("appearson"); entity.printpricefl = row.Field <bool>("printpricefl"); entity.user1 = row.IsNull("user1") ? string.Empty : row.Field <string>("user1"); entity.user2 = row.IsNull("user2") ? string.Empty : row.Field <string>("user2"); entity.user3 = row.IsNull("user3") ? string.Empty : row.Field <string>("user3"); entity.user4 = row.IsNull("user4") ? string.Empty : row.Field <string>("user4"); entity.user5 = row.IsNull("user5") ? string.Empty : row.Field <string>("user5"); entity.user6 = row.Field <decimal?>("user6"); entity.user7 = row.Field <decimal?>("user7"); entity.user8 = row.Field <DateTime?>("user8"); entity.user9 = row.Field <DateTime?>("user9"); entity.rowidSwsj = row.Field <byte[]>("rowid-swsj").ToStringEncoded(); return(entity); }