Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApeiinvdetaddontotals(ref DataRow row, Apeiinvdetaddontotals entity)
 {
     row.SetField("addontotal", entity.addontotal);
     row.SetField("expensedtotal", entity.expensedtotal);
     row.SetField("discounttotal", entity.discounttotal);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Apeiinvdetaddontotals BuildApeiinvdetaddontotalsFromRow(DataRow row)
        {
            Apeiinvdetaddontotals entity = new Apeiinvdetaddontotals();

            entity.addontotal    = row.IsNull("addontotal") ? decimal.Zero : row.Field <decimal>("addontotal");
            entity.expensedtotal = row.IsNull("expensedtotal") ? decimal.Zero : row.Field <decimal>("expensedtotal");
            entity.discounttotal = row.IsNull("discounttotal") ? decimal.Zero : row.Field <decimal>("discounttotal");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }