protected virtual int ExecuteAction(XIOT.Data.Objects.CB_DataElement theCB_DataElement, XIOT.Data.Objects.CB_DataElement original_CB_DataElement, string lastCommandName, string commandName, string dataView) { ActionArgs args = new ActionArgs(); args.Controller = "CB_DataElement"; args.View = dataView; args.Values = CreateFieldValues(theCB_DataElement, original_CB_DataElement); args.LastCommandName = lastCommandName; args.CommandName = commandName; ActionResult result = ControllerFactory.CreateDataController().Execute("CB_DataElement", dataView, args); result.RaiseExceptionIfErrors(); result.AssignTo(theCB_DataElement); return(result.RowsAffected); }
protected virtual FieldValue[] CreateFieldValues(XIOT.Data.Objects.CB_DataElement theCB_DataElement, XIOT.Data.Objects.CB_DataElement original_CB_DataElement) { List <FieldValue> values = new List <FieldValue>(); values.Add(new FieldValue("DataElementID", original_CB_DataElement.DataElementID, theCB_DataElement.DataElementID)); values.Add(new FieldValue("EventID", original_CB_DataElement.EventID, theCB_DataElement.EventID)); values.Add(new FieldValue("EventName", original_CB_DataElement.EventName, theCB_DataElement.EventName)); values.Add(new FieldValue("EventEventTypeEventType", original_CB_DataElement.EventEventTypeEventType, theCB_DataElement.EventEventTypeEventType)); values.Add(new FieldValue("EventLogSourceCode", original_CB_DataElement.EventLogSourceCode, theCB_DataElement.EventLogSourceCode)); values.Add(new FieldValue("EventTimeSourceCode", original_CB_DataElement.EventTimeSourceCode, theCB_DataElement.EventTimeSourceCode)); values.Add(new FieldValue("DataElementName", original_CB_DataElement.DataElementName, theCB_DataElement.DataElementName)); values.Add(new FieldValue("Description", original_CB_DataElement.Description, theCB_DataElement.Description)); values.Add(new FieldValue("IsActive", original_CB_DataElement.IsActive, theCB_DataElement.IsActive)); values.Add(new FieldValue("DateCreated", original_CB_DataElement.DateCreated, theCB_DataElement.DateCreated)); values.Add(new FieldValue("DateModified", original_CB_DataElement.DateModified, theCB_DataElement.DateModified)); return(values.ToArray()); }
public virtual int Delete(XIOT.Data.Objects.CB_DataElement theCB_DataElement) { return(ExecuteAction(theCB_DataElement, theCB_DataElement, "Select", "Delete", DeleteView)); }
public virtual int Insert(XIOT.Data.Objects.CB_DataElement theCB_DataElement) { return(ExecuteAction(theCB_DataElement, new CB_DataElement(), "New", "Insert", InsertView)); }
public virtual int Update(XIOT.Data.Objects.CB_DataElement theCB_DataElement) { return(Update(theCB_DataElement, SelectSingle(theCB_DataElement.DataElementID))); }
public virtual int Update(XIOT.Data.Objects.CB_DataElement theCB_DataElement, XIOT.Data.Objects.CB_DataElement original_CB_DataElement) { return(ExecuteAction(theCB_DataElement, original_CB_DataElement, "Edit", "Update", UpdateView)); }
public List <XIOT.Data.Objects.CB_DataElement> Select(XIOT.Data.Objects.CB_DataElement qbe) { return(Select(qbe.DataElementID, qbe.EventID, qbe.EventName, qbe.EventEventTypeEventType, qbe.EventLogSourceCode, qbe.EventTimeSourceCode, qbe.DataElementName, qbe.Description, qbe.IsActive, qbe.DateCreated, qbe.DateModified)); }
public static List <XIOT.Data.Objects.CB_DataElement> Select(XIOT.Data.Objects.CB_DataElement qbe) { return(new CB_DataElementFactory().Select(qbe)); }