Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdergetclaimresults(ref DataRow row, Pdergetclaimresults entity)
 {
     row.SetField("recordtype", entity.recordtype);
     row.SetField("action", entity.action);
     row.SetField("statustype", entity.statustype);
     row.SetField("claimno", entity.claimno);
     row.SetField("claimseqno", entity.claimseqno);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnotesfl", entity.vendnotesfl);
     row.SetField("vendname", entity.vendname);
     row.SetField("apinvno", entity.apinvno);
     row.SetField("currencyty", entity.currencyty);
     row.SetField("currencytydesc", entity.currencytydesc);
     row.SetField("receiptamt", entity.receiptamt);
     row.SetField("receiptdt", entity.receiptdt);
     row.SetField("reconamt", entity.reconamt);
     row.SetField("rebatecd", entity.rebatecd);
     row.SetField("refer", entity.refer);
     row.SetField("divno", entity.divno);
     row.SetField("sourcepros", entity.sourcepros);
     row.SetField("srcupdtty", entity.srcupdtty);
     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 Pdergetclaimresults BuildPdergetclaimresultsFromRow(DataRow row)
        {
            Pdergetclaimresults entity = new Pdergetclaimresults();

            entity.recordtype     = row.IsNull("recordtype") ? string.Empty : row.Field <string>("recordtype");
            entity.action         = row.IsNull("action") ? string.Empty : row.Field <string>("action");
            entity.statustype     = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.claimno        = row.IsNull("claimno") ? 0 : row.Field <int>("claimno");
            entity.claimseqno     = row.IsNull("claimseqno") ? 0 : row.Field <int>("claimseqno");
            entity.vendno         = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnotesfl    = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl");
            entity.vendname       = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname");
            entity.apinvno        = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno");
            entity.currencyty     = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            entity.currencytydesc = row.IsNull("currencytydesc") ? string.Empty : row.Field <string>("currencytydesc");
            entity.receiptamt     = row.IsNull("receiptamt") ? decimal.Zero : row.Field <decimal>("receiptamt");
            entity.receiptdt      = row.Field <DateTime?>("receiptdt");
            entity.reconamt       = row.IsNull("reconamt") ? decimal.Zero : row.Field <decimal>("reconamt");
            entity.rebatecd       = row.IsNull("rebatecd") ? string.Empty : row.Field <string>("rebatecd");
            entity.refer          = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.divno          = row.IsNull("divno") ? 0 : row.Field <int>("divno");
            entity.sourcepros     = row.IsNull("sourcepros") ? string.Empty : row.Field <string>("sourcepros");
            entity.srcupdtty      = row.IsNull("srcupdtty") ? string.Empty : row.Field <string>("srcupdtty");
            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);
        }