/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOrderinquirylistcriteria(ref DataRow row, Orderinquirylistcriteria entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("order", entity.order); row.SetField("order_suffix", entity.orderSuffix); row.SetField("ship_cust_code", entity.shipCustCode); row.SetField("carrier", entity.carrier); row.SetField("ship_name", entity.shipName); row.SetField("ship_addr_1", entity.shipAddr1); row.SetField("ship_addr_2", entity.shipAddr2); row.SetField("ship_city", entity.shipCity); row.SetField("ship_state", entity.shipState); row.SetField("ship_zip", entity.shipZip); row.SetField("rma", entity.rma); row.SetField("batch", entity.batch); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("userfield", entity.userfield); }
public static Orderinquirylistcriteria BuildOrderinquirylistcriteriaFromRow(DataRow row) { Orderinquirylistcriteria entity = new Orderinquirylistcriteria(); entity.coNum = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num"); entity.whNum = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num"); entity.order = row.IsNull("order") ? string.Empty : row.Field <string>("order"); entity.orderSuffix = row.IsNull("order_suffix") ? string.Empty : row.Field <string>("order_suffix"); entity.shipCustCode = row.IsNull("ship_cust_code") ? string.Empty : row.Field <string>("ship_cust_code"); entity.carrier = row.IsNull("carrier") ? string.Empty : row.Field <string>("carrier"); entity.shipName = row.IsNull("ship_name") ? string.Empty : row.Field <string>("ship_name"); entity.shipAddr1 = row.IsNull("ship_addr_1") ? string.Empty : row.Field <string>("ship_addr_1"); entity.shipAddr2 = row.IsNull("ship_addr_2") ? string.Empty : row.Field <string>("ship_addr_2"); entity.shipCity = row.IsNull("ship_city") ? string.Empty : row.Field <string>("ship_city"); entity.shipState = row.IsNull("ship_state") ? string.Empty : row.Field <string>("ship_state"); entity.shipZip = row.IsNull("ship_zip") ? string.Empty : row.Field <string>("ship_zip"); entity.rma = row.IsNull("rma") ? string.Empty : row.Field <string>("rma"); entity.batch = row.IsNull("batch") ? 0 : row.Field <int>("batch"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }