示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCrectransap(ref DataRow row, Crectransap entity)
 {
     row.SetField("dtInvDt", entity.dtInvDt);
     row.SetField("apinvno", entity.apinvno);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("vendno", entity.vendno);
     row.SetField("cVendorNotes", entity.cVendorNotes);
     row.SetField("cDisputeFl", entity.cDisputeFl);
     row.SetField("cTransCd", entity.cTransCd);
     row.SetField("cStatusType", entity.cStatusType);
     row.SetField("cRefer", entity.cRefer);
     row.SetField("dAmount", entity.dAmount);
     row.SetField("dAmtDue", entity.dAmtDue);
     row.SetField("checkno", entity.checkno);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("setno", entity.setno);
     row.SetField("apetrowid", entity.apetrowid.ToByteArray());
     row.SetField("manualaddress-sensitive", entity.manualaddressSensitive);
     row.SetField("apemmrowid", entity.apemmrowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Crectransap BuildCrectransapFromRow(DataRow row)
        {
            Crectransap entity = new Crectransap();

            entity.dtInvDt                = row.Field <DateTime?>("dtInvDt");
            entity.apinvno                = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno");
            entity.notesfl                = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.vendno                 = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.cVendorNotes           = row.IsNull("cVendorNotes") ? string.Empty : row.Field <string>("cVendorNotes");
            entity.cDisputeFl             = row.IsNull("cDisputeFl") ? string.Empty : row.Field <string>("cDisputeFl");
            entity.cTransCd               = row.IsNull("cTransCd") ? string.Empty : row.Field <string>("cTransCd");
            entity.cStatusType            = row.IsNull("cStatusType") ? string.Empty : row.Field <string>("cStatusType");
            entity.cRefer                 = row.IsNull("cRefer") ? string.Empty : row.Field <string>("cRefer");
            entity.dAmount                = row.IsNull("dAmount") ? decimal.Zero : row.Field <decimal>("dAmount");
            entity.dAmtDue                = row.IsNull("dAmtDue") ? decimal.Zero : row.Field <decimal>("dAmtDue");
            entity.checkno                = row.IsNull("checkno") ? decimal.Zero : row.Field <decimal>("checkno");
            entity.jrnlno                 = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.setno                  = row.IsNull("setno") ? 0 : row.Field <int>("setno");
            entity.apetrowid              = row.Field <byte[]>("apetrowid").ToStringEncoded();
            entity.manualaddressSensitive = row.Field <bool>("manualaddress-sensitive");
            entity.apemmrowid             = row.Field <byte[]>("apemmrowid").ToStringEncoded();
            entity.userfield              = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }