protected virtual int ExecuteAction(XIOT.Data.Objects.DIM_Events theDIM_Events, XIOT.Data.Objects.DIM_Events original_DIM_Events, string lastCommandName, string commandName, string dataView) { ActionArgs args = new ActionArgs(); args.Controller = "DIM_Events"; args.View = dataView; args.Values = CreateFieldValues(theDIM_Events, original_DIM_Events); args.LastCommandName = lastCommandName; args.CommandName = commandName; ActionResult result = ControllerFactory.CreateDataController().Execute("DIM_Events", dataView, args); result.RaiseExceptionIfErrors(); result.AssignTo(theDIM_Events); return(result.RowsAffected); }
protected virtual FieldValue[] CreateFieldValues(XIOT.Data.Objects.DIM_Events theDIM_Events, XIOT.Data.Objects.DIM_Events original_DIM_Events) { List <FieldValue> values = new List <FieldValue>(); values.Add(new FieldValue("EventID", original_DIM_Events.EventID, theDIM_Events.EventID)); values.Add(new FieldValue("Name", original_DIM_Events.Name, theDIM_Events.Name)); values.Add(new FieldValue("EventTypeID", original_DIM_Events.EventTypeID, theDIM_Events.EventTypeID)); values.Add(new FieldValue("EventTypeEventType", original_DIM_Events.EventTypeEventType, theDIM_Events.EventTypeEventType)); values.Add(new FieldValue("IsActive", original_DIM_Events.IsActive, theDIM_Events.IsActive)); values.Add(new FieldValue("LogSourceID", original_DIM_Events.LogSourceID, theDIM_Events.LogSourceID)); values.Add(new FieldValue("LogSourceCode", original_DIM_Events.LogSourceCode, theDIM_Events.LogSourceCode)); values.Add(new FieldValue("Description", original_DIM_Events.Description, theDIM_Events.Description)); values.Add(new FieldValue("Granularity", original_DIM_Events.Granularity, theDIM_Events.Granularity)); values.Add(new FieldValue("TimeSourceID", original_DIM_Events.TimeSourceID, theDIM_Events.TimeSourceID)); values.Add(new FieldValue("TimeSourceCode", original_DIM_Events.TimeSourceCode, theDIM_Events.TimeSourceCode)); values.Add(new FieldValue("ServerUTCOffset", original_DIM_Events.ServerUTCOffset, theDIM_Events.ServerUTCOffset)); return(values.ToArray()); }
public virtual int Delete(XIOT.Data.Objects.DIM_Events theDIM_Events) { return(ExecuteAction(theDIM_Events, theDIM_Events, "Select", "Delete", DeleteView)); }
public virtual int Insert(XIOT.Data.Objects.DIM_Events theDIM_Events) { return(ExecuteAction(theDIM_Events, new DIM_Events(), "New", "Insert", InsertView)); }
public virtual int Update(XIOT.Data.Objects.DIM_Events theDIM_Events) { return(Update(theDIM_Events, SelectSingle(theDIM_Events.EventID))); }
public virtual int Update(XIOT.Data.Objects.DIM_Events theDIM_Events, XIOT.Data.Objects.DIM_Events original_DIM_Events) { return(ExecuteAction(theDIM_Events, original_DIM_Events, "Edit", "Update", UpdateView)); }
public List <XIOT.Data.Objects.DIM_Events> Select(XIOT.Data.Objects.DIM_Events qbe) { return(Select(qbe.EventID, qbe.Name, qbe.EventTypeID, qbe.EventTypeEventType, qbe.IsActive, qbe.LogSourceID, qbe.LogSourceCode, qbe.Description, qbe.Granularity, qbe.TimeSourceID, qbe.TimeSourceCode, qbe.ServerUTCOffset)); }
public static List <XIOT.Data.Objects.DIM_Events> Select(XIOT.Data.Objects.DIM_Events qbe) { return(new DIM_EventsFactory().Select(qbe)); }