/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromVaspheaderfindresults(ref DataRow row, Vaspheaderfindresults entity) { row.SetField("prod", entity.prod); row.SetField("prodnotes", entity.prodnotes); row.SetField("proddescrip", entity.proddescrip); row.SetField("whse", entity.whse); row.SetField("whsedescrip", entity.whsedescrip); row.SetField("nodaysfab", entity.nodaysfab); row.SetField("refer", entity.refer); row.SetField("verno", entity.verno); row.SetField("verrefer", entity.verrefer); row.SetField("vercrtdt", entity.vercrtdt); row.SetField("updtallowedfl", entity.updtallowedfl); row.SetField("rowid", entity.rowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Vaspheaderfindresults BuildVaspheaderfindresultsFromRow(DataRow row) { Vaspheaderfindresults entity = new Vaspheaderfindresults(); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.prodnotes = row.IsNull("prodnotes") ? string.Empty : row.Field <string>("prodnotes"); entity.proddescrip = row.IsNull("proddescrip") ? string.Empty : row.Field <string>("proddescrip"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.whsedescrip = row.IsNull("whsedescrip") ? string.Empty : row.Field <string>("whsedescrip"); entity.nodaysfab = row.IsNull("nodaysfab") ? 0 : row.Field <int>("nodaysfab"); entity.refer = row.IsNull("refer") ? string.Empty : row.Field <string>("refer"); entity.verno = row.IsNull("verno") ? 0 : row.Field <int>("verno"); entity.verrefer = row.IsNull("verrefer") ? string.Empty : row.Field <string>("verrefer"); entity.vercrtdt = row.Field <DateTime?>("vercrtdt"); entity.updtallowedfl = row.Field <bool>("updtallowedfl"); entity.rowid = row.Field <byte[]>("rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }