Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdergetreceiptresults(ref DataRow row, Pdergetreceiptresults entity)
 {
     row.SetField("recordtype", entity.recordtype);
     row.SetField("action", entity.action);
     row.SetField("claimno", entity.claimno);
     row.SetField("claimseqno", entity.claimseqno);
     row.SetField("statustype", entity.statustype);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendname", entity.vendname);
     row.SetField("vendnotesf", entity.vendnotesf);
     row.SetField("divno", entity.divno);
     row.SetField("apinvno", entity.apinvno);
     row.SetField("receiptdt", entity.receiptdt);
     row.SetField("receiptamt", entity.receiptamt);
     row.SetField("refer", entity.refer);
     row.SetField("sourcepros", entity.sourcepros);
     row.SetField("srcupdtty", entity.srcupdtty);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("setno", entity.setno);
     row.SetField("postdt", entity.postdt);
     row.SetField("currencyty", entity.currencyty);
     row.SetField("vatamt", entity.vatamt);
     row.SetField("nettamt", entity.nettamt);
     row.SetField("rowidpderv", entity.rowidpderv.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Pdergetreceiptresults BuildPdergetreceiptresultsFromRow(DataRow row)
        {
            Pdergetreceiptresults entity = new Pdergetreceiptresults();

            entity.recordtype = row.IsNull("recordtype") ? string.Empty : row.Field <string>("recordtype");
            entity.action     = row.IsNull("action") ? string.Empty : row.Field <string>("action");
            entity.claimno    = row.IsNull("claimno") ? 0 : row.Field <int>("claimno");
            entity.claimseqno = row.IsNull("claimseqno") ? 0 : row.Field <int>("claimseqno");
            entity.statustype = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.vendno     = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendname   = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname");
            entity.vendnotesf = row.IsNull("vendnotesf") ? string.Empty : row.Field <string>("vendnotesf");
            entity.divno      = row.IsNull("divno") ? 0 : row.Field <int>("divno");
            entity.apinvno    = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno");
            entity.receiptdt  = row.Field <DateTime?>("receiptdt");
            entity.receiptamt = row.IsNull("receiptamt") ? decimal.Zero : row.Field <decimal>("receiptamt");
            entity.refer      = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.sourcepros = row.IsNull("sourcepros") ? string.Empty : row.Field <string>("sourcepros");
            entity.srcupdtty  = row.IsNull("srcupdtty") ? string.Empty : row.Field <string>("srcupdtty");
            entity.jrnlno     = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.setno      = row.IsNull("setno") ? 0 : row.Field <int>("setno");
            entity.postdt     = row.Field <DateTime?>("postdt");
            entity.currencyty = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            entity.vatamt     = row.IsNull("vatamt") ? decimal.Zero : row.Field <decimal>("vatamt");
            entity.nettamt    = row.IsNull("nettamt") ? decimal.Zero : row.Field <decimal>("nettamt");
            entity.rowidpderv = row.Field <byte[]>("rowidpderv").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }