public static Oeircchistoryresults BuildOeircchistoryresultsFromRow(DataRow row) { Oeircchistoryresults entity = new Oeircchistoryresults(); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.mediacd = row.IsNull("mediacd") ? 0 : row.Field <int>("mediacd"); entity.cardno = row.IsNull("cardno") ? string.Empty : row.Field <string>("cardno"); entity.enccardno = row.IsNull("enccardno") ? string.Empty : row.Field <string>("enccardno"); entity.exp = row.IsNull("exp") ? string.Empty : row.Field <string>("exp"); entity.transcd = row.IsNull("transcd") ? string.Empty : row.Field <string>("transcd"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.amount = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount"); entity.processcd = row.IsNull("processcd") ? 0 : row.Field <int>("processcd"); entity.commcd = row.IsNull("commcd") ? 0 : row.Field <int>("commcd"); entity.stage = row.IsNull("stage") ? string.Empty : row.Field <string>("stage"); entity.commst = row.IsNull("commst") ? string.Empty : row.Field <string>("commst"); entity.statustype = row.Field <bool>("statustype"); entity.charmediaauth = row.IsNull("charmediaauth") ? string.Empty : row.Field <string>("charmediaauth"); entity.ccholdbofl = row.Field <bool>("ccholdbofl"); entity.displayorder = row.IsNull("displayorder") ? 0 : row.Field <int>("displayorder"); entity.submitdt = row.Field <DateTime?>("submitdt"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeircchistoryresults(ref DataRow row, Oeircchistoryresults entity) { row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("mediacd", entity.mediacd); row.SetField("cardno", entity.cardno); row.SetField("enccardno", entity.enccardno); row.SetField("exp", entity.exp); row.SetField("transcd", entity.transcd); row.SetField("seqno", entity.seqno); row.SetField("amount", entity.amount); row.SetField("processcd", entity.processcd); row.SetField("commcd", entity.commcd); row.SetField("stage", entity.stage); row.SetField("commst", entity.commst); row.SetField("statustype", entity.statustype); row.SetField("charmediaauth", entity.charmediaauth); row.SetField("ccholdbofl", entity.ccholdbofl); row.SetField("displayorder", entity.displayorder); row.SetField("submitdt", entity.submitdt); row.SetField("userfield", entity.userfield); }