/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromAppurchasehistcriteria(ref DataRow row, Appurchasehistcriteria entity) { row.SetField("vendno", entity.vendno); row.SetField("whse", entity.whse); row.SetField("prodline", entity.prodline); row.SetField("yr", entity.yr); row.SetField("customparam", entity.customparam); }
public static Appurchasehistcriteria BuildAppurchasehistcriteriaFromRow(DataRow row) { Appurchasehistcriteria entity = new Appurchasehistcriteria(); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.prodline = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline"); entity.yr = row.IsNull("yr") ? 0 : row.Field <int>("yr"); entity.customparam = row.IsNull("customparam") ? string.Empty : row.Field <string>("customparam"); return(entity); }