/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSwjobtypelookupcriteria(ref DataRow row, Swjobtypelookupcriteria entity) { row.SetField("jobtype", entity.jobtype); row.SetField("oetype", entity.oetype); row.SetField("prodcat", entity.prodcat); row.SetField("chargecode", entity.chargecode); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("customfield", entity.customfield); }
public static Swjobtypelookupcriteria BuildSwjobtypelookupcriteriaFromRow(DataRow row) { Swjobtypelookupcriteria entity = new Swjobtypelookupcriteria(); entity.jobtype = row.IsNull("jobtype") ? string.Empty : row.Field <string>("jobtype"); entity.oetype = row.IsNull("oetype") ? string.Empty : row.Field <string>("oetype"); entity.prodcat = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat"); entity.chargecode = row.IsNull("chargecode") ? string.Empty : row.Field <string>("chargecode"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.customfield = row.IsNull("customfield") ? string.Empty : row.Field <string>("customfield"); return(entity); }