/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSlpricecostmultcopy(ref DataRow row, Slpricecostmultcopy entity) { row.SetField("cono", entity.cono); row.SetField("imptype", entity.imptype); row.SetField("fromslgroup", entity.fromslgroup); row.SetField("fromwhse", entity.fromwhse); row.SetField("toslgroup", entity.toslgroup); row.SetField("towhse", entity.towhse); row.SetField("rowid", entity.rowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Slpricecostmultcopy BuildSlpricecostmultcopyFromRow(DataRow row) { Slpricecostmultcopy entity = new Slpricecostmultcopy(); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.imptype = row.IsNull("imptype") ? string.Empty : row.Field <string>("imptype"); entity.fromslgroup = row.IsNull("fromslgroup") ? string.Empty : row.Field <string>("fromslgroup"); entity.fromwhse = row.IsNull("fromwhse") ? string.Empty : row.Field <string>("fromwhse"); entity.toslgroup = row.IsNull("toslgroup") ? string.Empty : row.Field <string>("toslgroup"); entity.towhse = row.IsNull("towhse") ? string.Empty : row.Field <string>("towhse"); entity.rowid = row.Field <byte[]>("rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }