/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcspecprccostlookupcriteria(ref DataRow row, Icspecprccostlookupcriteria entity) { row.SetField("prod", entity.prod); row.SetField("viewall", entity.viewall); row.SetField("batchsize", entity.batchsize); row.SetField("userfield", entity.userfield); }
public static Icspecprccostlookupcriteria BuildIcspecprccostlookupcriteriaFromRow(DataRow row) { Icspecprccostlookupcriteria entity = new Icspecprccostlookupcriteria(); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.viewall = row.Field <bool>("viewall"); entity.batchsize = row.IsNull("batchsize") ? 0 : row.Field <int>("batchsize"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }