public static Ptxtransheaderdetailcriteria BuildPtxtransheaderdetailcriteriaFromRow(DataRow row) { Ptxtransheaderdetailcriteria entity = new Ptxtransheaderdetailcriteria(); 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.rwidtranshdr = row.Field <byte[]>("rwidtranshdr").ToStringEncoded(); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPtxtransheaderdetailcriteria(ref DataRow row, Ptxtransheaderdetailcriteria entity) { row.SetField("distpartnerid", entity.distpartnerid); row.SetField("distinvno", entity.distinvno); row.SetField("distinvsuf", entity.distinvsuf); row.SetField("distinvseqno", entity.distinvseqno); row.SetField("rwidtranshdr", entity.rwidtranshdr.ToByteArray()); }