/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromArspcustpaymenthistorycopy(ref DataRow row, Arspcustpaymenthistorycopy entity) { row.SetField("fromcustno", entity.fromcustno); row.SetField("tocustno", entity.tocustno); row.SetField("rowid", entity.rowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Arspcustpaymenthistorycopy BuildArspcustpaymenthistorycopyFromRow(DataRow row) { Arspcustpaymenthistorycopy entity = new Arspcustpaymenthistorycopy(); entity.fromcustno = row.IsNull("fromcustno") ? decimal.Zero : row.Field <decimal>("fromcustno"); entity.tocustno = row.IsNull("tocustno") ? decimal.Zero : row.Field <decimal>("tocustno"); entity.rowid = row.Field <byte[]>("rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }