protected virtual FieldValue[] CreateFieldValues(MyCompany.Data.Objects.WorkingType theWorkingType, MyCompany.Data.Objects.WorkingType original_WorkingType) { List <FieldValue> values = new List <FieldValue>(); values.Add(new FieldValue("WorkTypeId", original_WorkingType.WorkTypeId, theWorkingType.WorkTypeId)); values.Add(new FieldValue("Code", original_WorkingType.Code, theWorkingType.Code)); return(values.ToArray()); }
protected virtual int ExecuteAction(MyCompany.Data.Objects.WorkingType theWorkingType, MyCompany.Data.Objects.WorkingType original_WorkingType, string lastCommandName, string commandName, string dataView) { ActionArgs args = new ActionArgs(); args.Controller = "WorkingType"; args.View = dataView; args.Values = CreateFieldValues(theWorkingType, original_WorkingType); args.LastCommandName = lastCommandName; args.CommandName = commandName; ActionResult result = ControllerFactory.CreateDataController().Execute("WorkingType", dataView, args); result.RaiseExceptionIfErrors(); result.AssignTo(theWorkingType); return(result.RowsAffected); }
public static List <MyCompany.Data.Objects.WorkingType> Select(MyCompany.Data.Objects.WorkingType qbe) { return(new WorkingTypeFactory().Select(qbe)); }
public virtual int Delete(MyCompany.Data.Objects.WorkingType theWorkingType) { return(ExecuteAction(theWorkingType, theWorkingType, "Select", "Delete", DeleteView)); }
public virtual int Insert(MyCompany.Data.Objects.WorkingType theWorkingType) { return(ExecuteAction(theWorkingType, new WorkingType(), "New", "Insert", InsertView)); }
public virtual int Update(MyCompany.Data.Objects.WorkingType theWorkingType) { return(Update(theWorkingType, SelectSingle(theWorkingType.WorkTypeId))); }
public virtual int Update(MyCompany.Data.Objects.WorkingType theWorkingType, MyCompany.Data.Objects.WorkingType original_WorkingType) { return(ExecuteAction(theWorkingType, original_WorkingType, "Edit", "Update", UpdateView)); }
public List <MyCompany.Data.Objects.WorkingType> Select(MyCompany.Data.Objects.WorkingType qbe) { return(Select(qbe.WorkTypeId, qbe.Code)); }