/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcsdploadttresults(ref DataRow row, Icsdploadttresults entity) { row.SetField("icsdprowid", entity.icsdprowid.ToByteArray()); row.SetField("whse", entity.whse); row.SetField("mediacd", entity.mediacd); row.SetField("paybankno", entity.paybankno); row.SetField("merchantid", entity.merchantid); row.SetField("merchantuserid", entity.merchantuserid); row.SetField("merchantpassword", entity.merchantpassword); row.SetField("mediadesc", entity.mediadesc); row.SetField("paybanknm", entity.paybanknm); row.SetField("merchantdesc", entity.merchantdesc); row.SetField("userfield", entity.userfield); }
public static Icsdploadttresults BuildIcsdploadttresultsFromRow(DataRow row) { Icsdploadttresults entity = new Icsdploadttresults(); entity.icsdprowid = row.Field <byte[]>("icsdprowid").ToStringEncoded(); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.mediacd = row.IsNull("mediacd") ? 0 : row.Field <int>("mediacd"); entity.paybankno = row.IsNull("paybankno") ? 0 : row.Field <int>("paybankno"); entity.merchantid = row.IsNull("merchantid") ? string.Empty : row.Field <string>("merchantid"); entity.merchantuserid = row.IsNull("merchantuserid") ? string.Empty : row.Field <string>("merchantuserid"); entity.merchantpassword = row.IsNull("merchantpassword") ? string.Empty : row.Field <string>("merchantpassword"); entity.mediadesc = row.IsNull("mediadesc") ? string.Empty : row.Field <string>("mediadesc"); entity.paybanknm = row.IsNull("paybanknm") ? string.Empty : row.Field <string>("paybanknm"); entity.merchantdesc = row.IsNull("merchantdesc") ? string.Empty : row.Field <string>("merchantdesc"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }