Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromAddotaddoncriteria(ref DataRow row, Addotaddoncriteria entity)
 {
     row.SetField("trackno", entity.trackno);
     row.SetField("addonno", entity.addonno);
     row.SetField("addonamt", entity.addonamt);
     row.SetField("addontype", entity.addontype);
     row.SetField("addondistr", entity.addondistr);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Addotaddoncriteria BuildAddotaddoncriteriaFromRow(DataRow row)
        {
            Addotaddoncriteria entity = new Addotaddoncriteria();

            entity.trackno    = row.IsNull("trackno") ? 0 : row.Field <int>("trackno");
            entity.addonno    = row.IsNull("addonno") ? 0 : row.Field <int>("addonno");
            entity.addonamt   = row.IsNull("addonamt") ? decimal.Zero : row.Field <decimal>("addonamt");
            entity.addontype  = row.Field <bool>("addontype");
            entity.addondistr = row.IsNull("addondistr") ? string.Empty : row.Field <string>("addondistr");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }