Beispiel #1
0
        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());
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public static List <MyCompany.Data.Objects.WorkingType> Select(MyCompany.Data.Objects.WorkingType qbe)
 {
     return(new WorkingTypeFactory().Select(qbe));
 }
Beispiel #4
0
 public virtual int Delete(MyCompany.Data.Objects.WorkingType theWorkingType)
 {
     return(ExecuteAction(theWorkingType, theWorkingType, "Select", "Delete", DeleteView));
 }
Beispiel #5
0
 public virtual int Insert(MyCompany.Data.Objects.WorkingType theWorkingType)
 {
     return(ExecuteAction(theWorkingType, new WorkingType(), "New", "Insert", InsertView));
 }
Beispiel #6
0
 public virtual int Update(MyCompany.Data.Objects.WorkingType theWorkingType)
 {
     return(Update(theWorkingType, SelectSingle(theWorkingType.WorkTypeId)));
 }
Beispiel #7
0
 public virtual int Update(MyCompany.Data.Objects.WorkingType theWorkingType, MyCompany.Data.Objects.WorkingType original_WorkingType)
 {
     return(ExecuteAction(theWorkingType, original_WorkingType, "Edit", "Update", UpdateView));
 }
Beispiel #8
0
 public List <MyCompany.Data.Objects.WorkingType> Select(MyCompany.Data.Objects.WorkingType qbe)
 {
     return(Select(qbe.WorkTypeId, qbe.Code));
 }