Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPderfinaleditresults(ref DataRow row, Pderfinaleditresults entity)
 {
     row.SetField("proofAmt", entity.proofAmt);
     row.SetField("postAmt", entity.postAmt);
     row.SetField("APCreditAmt", entity.aPCreditAmt);
     row.SetField("writeOffAmt", entity.writeOffAmt);
     row.SetField("writeOffBalType", entity.writeOffBalType);
     row.SetField("reference", entity.reference);
     row.SetField("totalVendRcpts", entity.totalVendRcpts);
     row.SetField("totalLineRcpts", entity.totalLineRcpts);
     row.SetField("divno", entity.divno);
     row.SetField("currencyty", entity.currencyty);
     row.SetField("reconexrate", entity.reconexrate);
     row.SetField("currencytyhidden", entity.currencytyhidden);
     row.SetField("currencytyenabled", entity.currencytyenabled);
     row.SetField("reconexrateenabled", entity.reconexrateenabled);
     row.SetField("rowidpderc", entity.rowidpderc.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Pderfinaleditresults BuildPderfinaleditresultsFromRow(DataRow row)
        {
            Pderfinaleditresults entity = new Pderfinaleditresults();

            entity.proofAmt           = row.IsNull("proofAmt") ? decimal.Zero : row.Field <decimal>("proofAmt");
            entity.postAmt            = row.IsNull("postAmt") ? decimal.Zero : row.Field <decimal>("postAmt");
            entity.aPCreditAmt        = row.IsNull("APCreditAmt") ? decimal.Zero : row.Field <decimal>("APCreditAmt");
            entity.writeOffAmt        = row.IsNull("writeOffAmt") ? decimal.Zero : row.Field <decimal>("writeOffAmt");
            entity.writeOffBalType    = row.Field <bool>("writeOffBalType");
            entity.reference          = row.IsNull("reference") ? string.Empty : row.Field <string>("reference");
            entity.totalVendRcpts     = row.IsNull("totalVendRcpts") ? decimal.Zero : row.Field <decimal>("totalVendRcpts");
            entity.totalLineRcpts     = row.IsNull("totalLineRcpts") ? decimal.Zero : row.Field <decimal>("totalLineRcpts");
            entity.divno              = row.IsNull("divno") ? 0 : row.Field <int>("divno");
            entity.currencyty         = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            entity.reconexrate        = row.IsNull("reconexrate") ? decimal.Zero : row.Field <decimal>("reconexrate");
            entity.currencytyhidden   = row.Field <bool>("currencytyhidden");
            entity.currencytyenabled  = row.Field <bool>("currencytyenabled");
            entity.reconexrateenabled = row.Field <bool>("reconexrateenabled");
            entity.rowidpderc         = row.Field <byte[]>("rowidpderc").ToStringEncoded();
            entity.userfield          = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }