/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPtxtranseditcriteria(ref DataRow row, Ptxtranseditcriteria entity) { row.SetField("distpartnerid", entity.distpartnerid); row.SetField("distinvno", entity.distinvno); row.SetField("distinvsuf", entity.distinvsuf); row.SetField("distinvseqno", entity.distinvseqno); row.SetField("makeactivefl", entity.makeactivefl); row.SetField("makeinactivefl", entity.makeinactivefl); row.SetField("cancelfl", entity.cancelfl); row.SetField("deletefl", entity.deletefl); row.SetField("reportcd", entity.reportcd); row.SetField("reporteddt", entity.reporteddt); row.SetField("rwidptxtranshdr", entity.rwidptxtranshdr.ToByteArray()); }
public static Ptxtranseditcriteria BuildPtxtranseditcriteriaFromRow(DataRow row) { Ptxtranseditcriteria entity = new Ptxtranseditcriteria(); entity.distpartnerid = row.IsNull("distpartnerid") ? string.Empty : row.Field <string>("distpartnerid"); entity.distinvno = row.IsNull("distinvno") ? 0 : row.Field <int>("distinvno"); entity.distinvsuf = row.IsNull("distinvsuf") ? 0 : row.Field <int>("distinvsuf"); entity.distinvseqno = row.IsNull("distinvseqno") ? 0 : row.Field <int>("distinvseqno"); entity.makeactivefl = row.Field <bool>("makeactivefl"); entity.makeinactivefl = row.Field <bool>("makeinactivefl"); entity.cancelfl = row.Field <bool>("cancelfl"); entity.deletefl = row.Field <bool>("deletefl"); entity.reportcd = row.IsNull("reportcd") ? string.Empty : row.Field <string>("reportcd"); entity.reporteddt = row.Field <DateTime?>("reporteddt"); entity.rwidptxtranshdr = row.Field <byte[]>("rwidptxtranshdr").ToStringEncoded(); return(entity); }