Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPtxtransdetailaddons(ref DataRow row, Ptxtransdetailaddons entity)
 {
     row.SetField("distpartnerid", entity.distpartnerid);
     row.SetField("distinvno", entity.distinvno);
     row.SetField("distinvsuf", entity.distinvsuf);
     row.SetField("distinvseqno", entity.distinvseqno);
     row.SetField("seqno", entity.seqno);
     row.SetField("specservcd", entity.specservcd);
     row.SetField("specchrgcd", entity.specchrgcd);
     row.SetField("addonnet", entity.addonnet);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("rwidptxtransaddon", entity.rwidptxtransaddon.ToByteArray());
 }
Esempio n. 2
0
        public static Ptxtransdetailaddons BuildPtxtransdetailaddonsFromRow(DataRow row)
        {
            Ptxtransdetailaddons entity = new Ptxtransdetailaddons();

            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.seqno             = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.specservcd        = row.IsNull("specservcd") ? string.Empty : row.Field <string>("specservcd");
            entity.specchrgcd        = row.IsNull("specchrgcd") ? string.Empty : row.Field <string>("specchrgcd");
            entity.addonnet          = row.IsNull("addonnet") ? decimal.Zero : row.Field <decimal>("addonnet");
            entity.user1             = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2             = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3             = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4             = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5             = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6             = row.Field <decimal?>("user6");
            entity.user7             = row.Field <decimal?>("user7");
            entity.user8             = row.Field <DateTime?>("user8");
            entity.user9             = row.Field <DateTime?>("user9");
            entity.rwidptxtransaddon = row.Field <byte[]>("rwidptxtransaddon").ToStringEncoded();
            return(entity);
        }