/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdsvclookupcriteria(ref DataRow row, Pdsvclookupcriteria entity) { row.SetField("contractno", entity.contractno); row.SetField("prod", entity.prod); row.SetField("whse", entity.whse); row.SetField("levelcd", entity.levelcd); row.SetField("statuscd", entity.statuscd); row.SetField("vendno", entity.vendno); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("userfield", entity.userfield); }
public static Pdsvclookupcriteria BuildPdsvclookupcriteriaFromRow(DataRow row) { Pdsvclookupcriteria entity = new Pdsvclookupcriteria(); entity.contractno = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.levelcd = row.IsNull("levelcd") ? string.Empty : row.Field <string>("levelcd"); entity.statuscd = row.IsNull("statuscd") ? string.Empty : row.Field <string>("statuscd"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }