Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApeiinvdettermstotals(ref DataRow row, Apeiinvdettermstotals entity)
 {
     row.SetField("proofinvamt", entity.proofinvamt);
     row.SetField("proofinvpay", entity.proofinvpay);
     row.SetField("proofinvremain", entity.proofinvremain);
     row.SetField("prooforigdisc", entity.prooforigdisc);
     row.SetField("proofdiscpay", entity.proofdiscpay);
     row.SetField("proofdiscremain", entity.proofdiscremain);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Apeiinvdettermstotals BuildApeiinvdettermstotalsFromRow(DataRow row)
        {
            Apeiinvdettermstotals entity = new Apeiinvdettermstotals();

            entity.proofinvamt     = row.IsNull("proofinvamt") ? decimal.Zero : row.Field <decimal>("proofinvamt");
            entity.proofinvpay     = row.IsNull("proofinvpay") ? decimal.Zero : row.Field <decimal>("proofinvpay");
            entity.proofinvremain  = row.IsNull("proofinvremain") ? decimal.Zero : row.Field <decimal>("proofinvremain");
            entity.prooforigdisc   = row.IsNull("prooforigdisc") ? decimal.Zero : row.Field <decimal>("prooforigdisc");
            entity.proofdiscpay    = row.IsNull("proofdiscpay") ? decimal.Zero : row.Field <decimal>("proofdiscpay");
            entity.proofdiscremain = row.IsNull("proofdiscremain") ? decimal.Zero : row.Field <decimal>("proofdiscremain");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }