Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSaeaevents(ref DataRow row, Saeaevents entity)
 {
     row.SetField("eventname", entity.eventname);
     row.SetField("shortdesc", entity.shortdesc);
     row.SetField("triggername", entity.triggername);
     row.SetField("triggerdesc", entity.triggerdesc);
     row.SetField("sourcename", entity.sourcename);
     row.SetField("activatefl", entity.activatefl);
     row.SetField("purgetransfl", entity.purgetransfl);
     row.SetField("mess", entity.mess);
     row.SetField("custnoactionfl", entity.custnoactionfl);
     row.SetField("prodactionfl", entity.prodactionfl);
     row.SetField("regionactionfl", entity.regionactionfl);
     row.SetField("vendnoactionfl", entity.vendnoactionfl);
     row.SetField("whseactionfl", entity.whseactionfl);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Saeaevents BuildSaeaeventsFromRow(DataRow row)
        {
            Saeaevents entity = new Saeaevents();

            entity.eventname      = row.IsNull("eventname") ? string.Empty : row.Field <string>("eventname");
            entity.shortdesc      = row.IsNull("shortdesc") ? string.Empty : row.Field <string>("shortdesc");
            entity.triggername    = row.IsNull("triggername") ? string.Empty : row.Field <string>("triggername");
            entity.triggerdesc    = row.IsNull("triggerdesc") ? string.Empty : row.Field <string>("triggerdesc");
            entity.sourcename     = row.IsNull("sourcename") ? string.Empty : row.Field <string>("sourcename");
            entity.activatefl     = row.Field <bool>("activatefl");
            entity.purgetransfl   = row.Field <bool>("purgetransfl");
            entity.mess           = row.IsNull("mess") ? string.Empty : row.Field <string>("mess");
            entity.custnoactionfl = row.Field <bool>("custnoactionfl");
            entity.prodactionfl   = row.Field <bool>("prodactionfl");
            entity.regionactionfl = row.Field <bool>("regionactionfl");
            entity.vendnoactionfl = row.Field <bool>("vendnoactionfl");
            entity.whseactionfl   = row.Field <bool>("whseactionfl");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }