/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromVaspasmblrule(ref DataRow row, Vaspasmblrule entity) { row.SetField("shipprod", entity.shipprod); row.SetField("whse", entity.whse); row.SetField("verno", entity.verno); row.SetField("segment", entity.segment); row.SetField("sequence", entity.sequence); row.SetField("rule1", entity.rule1); row.SetField("rule2", entity.rule2); row.SetField("rule3", entity.rule3); row.SetField("rule4", entity.rule4); row.SetField("ruleequality1", entity.ruleequality1); row.SetField("ruleequality2", entity.ruleequality2); row.SetField("ruleequality3", entity.ruleequality3); row.SetField("ruleequality4", entity.ruleequality4); row.SetField("ruleerrormsg", entity.ruleerrormsg); row.SetField("rulesegment1", entity.rulesegment1); row.SetField("rulesegment2", entity.rulesegment2); row.SetField("rulesegment3", entity.rulesegment3); row.SetField("rulesegment4", entity.rulesegment4); row.SetField("ruleunion1", entity.ruleunion1); row.SetField("ruleunion2", entity.ruleunion2); row.SetField("ruleunion3", entity.ruleunion3); row.SetField("ruleunion4", entity.ruleunion4); row.SetField("rulevaliddata", entity.rulevaliddata); row.SetField("newrulefl", entity.newrulefl); row.SetField("rowid", entity.rowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Vaspasmblrule BuildVaspasmblruleFromRow(DataRow row) { Vaspasmblrule entity = new Vaspasmblrule(); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.verno = row.IsNull("verno") ? 0 : row.Field <int>("verno"); entity.segment = row.IsNull("segment") ? 0 : row.Field <int>("segment"); entity.sequence = row.IsNull("sequence") ? 0 : row.Field <int>("sequence"); entity.rule1 = row.IsNull("rule1") ? string.Empty : row.Field <string>("rule1"); entity.rule2 = row.IsNull("rule2") ? string.Empty : row.Field <string>("rule2"); entity.rule3 = row.IsNull("rule3") ? string.Empty : row.Field <string>("rule3"); entity.rule4 = row.IsNull("rule4") ? string.Empty : row.Field <string>("rule4"); entity.ruleequality1 = row.IsNull("ruleequality1") ? string.Empty : row.Field <string>("ruleequality1"); entity.ruleequality2 = row.IsNull("ruleequality2") ? string.Empty : row.Field <string>("ruleequality2"); entity.ruleequality3 = row.IsNull("ruleequality3") ? string.Empty : row.Field <string>("ruleequality3"); entity.ruleequality4 = row.IsNull("ruleequality4") ? string.Empty : row.Field <string>("ruleequality4"); entity.ruleerrormsg = row.IsNull("ruleerrormsg") ? string.Empty : row.Field <string>("ruleerrormsg"); entity.rulesegment1 = row.IsNull("rulesegment1") ? 0 : row.Field <int>("rulesegment1"); entity.rulesegment2 = row.IsNull("rulesegment2") ? 0 : row.Field <int>("rulesegment2"); entity.rulesegment3 = row.IsNull("rulesegment3") ? 0 : row.Field <int>("rulesegment3"); entity.rulesegment4 = row.IsNull("rulesegment4") ? 0 : row.Field <int>("rulesegment4"); entity.ruleunion1 = row.Field <bool>("ruleunion1"); entity.ruleunion2 = row.Field <bool>("ruleunion2"); entity.ruleunion3 = row.Field <bool>("ruleunion3"); entity.ruleunion4 = row.Field <bool>("ruleunion4"); entity.rulevaliddata = row.IsNull("rulevaliddata") ? string.Empty : row.Field <string>("rulevaliddata"); entity.newrulefl = row.Field <bool>("newrulefl"); entity.rowid = row.Field <byte[]>("rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }