/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSlnewitemdefaultscopy(ref DataRow row, Slnewitemdefaultscopy entity) { row.SetField("cono", entity.cono); row.SetField("imptype", entity.imptype); row.SetField("fromvendcd", entity.fromvendcd); row.SetField("fromlinecd", entity.fromlinecd); row.SetField("tovendcd", entity.tovendcd); row.SetField("tolinecd", entity.tolinecd); row.SetField("rowid", entity.rowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Slnewitemdefaultscopy BuildSlnewitemdefaultscopyFromRow(DataRow row) { Slnewitemdefaultscopy entity = new Slnewitemdefaultscopy(); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.imptype = row.IsNull("imptype") ? string.Empty : row.Field <string>("imptype"); entity.fromvendcd = row.IsNull("fromvendcd") ? string.Empty : row.Field <string>("fromvendcd"); entity.fromlinecd = row.IsNull("fromlinecd") ? string.Empty : row.Field <string>("fromlinecd"); entity.tovendcd = row.IsNull("tovendcd") ? string.Empty : row.Field <string>("tovendcd"); entity.tolinecd = row.IsNull("tolinecd") ? string.Empty : row.Field <string>("tolinecd"); entity.rowid = row.Field <byte[]>("rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }