Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArilworesults(ref DataRow row, Arilworesults entity)
 {
     row.SetField("account", entity.account);
     row.SetField("amount", entity.amount);
     row.SetField("descrip", entity.descrip);
     row.SetField("origtaxamt", entity.origtaxamt);
     row.SetField("taxexemptamt", entity.taxexemptamt);
     row.SetField("origbaseamt", entity.origbaseamt);
     row.SetField("adjbaseamt", entity.adjbaseamt);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Arilworesults BuildArilworesultsFromRow(DataRow row)
        {
            Arilworesults entity = new Arilworesults();

            entity.account      = row.IsNull("account") ? string.Empty : row.Field <string>("account");
            entity.amount       = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.descrip      = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.origtaxamt   = row.IsNull("origtaxamt") ? decimal.Zero : row.Field <decimal>("origtaxamt");
            entity.taxexemptamt = row.IsNull("taxexemptamt") ? decimal.Zero : row.Field <decimal>("taxexemptamt");
            entity.origbaseamt  = row.IsNull("origbaseamt") ? decimal.Zero : row.Field <decimal>("origbaseamt");
            entity.adjbaseamt   = row.IsNull("adjbaseamt") ? decimal.Zero : row.Field <decimal>("adjbaseamt");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }