/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromVendorcurrencycriteria(ref DataRow row, Vendorcurrencycriteria entity) { row.SetField("ordertype", entity.ordertype); row.SetField("vendno", entity.vendno); row.SetField("prodcost", entity.prodcost); row.SetField("customparam", entity.customparam); }
public static Vendorcurrencycriteria BuildVendorcurrencycriteriaFromRow(DataRow row) { Vendorcurrencycriteria entity = new Vendorcurrencycriteria(); entity.ordertype = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.prodcost = row.IsNull("prodcost") ? decimal.Zero : row.Field <decimal>("prodcost"); entity.customparam = row.IsNull("customparam") ? string.Empty : row.Field <string>("customparam"); return(entity); }