/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWtorderlookupcriteria(ref DataRow row, Wtorderlookupcriteria entity) { row.SetField("cono", entity.cono); row.SetField("shipfmwhse", entity.shipfmwhse); row.SetField("shiptowhse", entity.shiptowhse); row.SetField("wtno", entity.wtno); row.SetField("wtsuf", entity.wtsuf); row.SetField("openonly", entity.openonly); row.SetField("transtype", entity.transtype); row.SetField("stage", entity.stage); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("customfield", entity.customfield); }
public static Wtorderlookupcriteria BuildWtorderlookupcriteriaFromRow(DataRow row) { Wtorderlookupcriteria entity = new Wtorderlookupcriteria(); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.shipfmwhse = row.IsNull("shipfmwhse") ? string.Empty : row.Field <string>("shipfmwhse"); entity.shiptowhse = row.IsNull("shiptowhse") ? string.Empty : row.Field <string>("shiptowhse"); entity.wtno = row.IsNull("wtno") ? 0 : row.Field <int>("wtno"); entity.wtsuf = row.IsNull("wtsuf") ? 0 : row.Field <int>("wtsuf"); entity.openonly = row.Field <bool>("openonly"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.stage = row.IsNull("stage") ? string.Empty : row.Field <string>("stage"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.customfield = row.IsNull("customfield") ? string.Empty : row.Field <string>("customfield"); return(entity); }