Beispiel #1
0
        protected virtual FieldValue[] CreateFieldValues(MyCompany.Data.Objects.CalDateType theCalDateType, MyCompany.Data.Objects.CalDateType original_CalDateType)
        {
            List <FieldValue> values = new List <FieldValue>();

            values.Add(new FieldValue("CalDateTypeId", original_CalDateType.CalDateTypeId, theCalDateType.CalDateTypeId));
            values.Add(new FieldValue("Code", original_CalDateType.Code, theCalDateType.Code));
            return(values.ToArray());
        }
Beispiel #2
0
        protected virtual int ExecuteAction(MyCompany.Data.Objects.CalDateType theCalDateType, MyCompany.Data.Objects.CalDateType original_CalDateType, string lastCommandName, string commandName, string dataView)
        {
            ActionArgs args = new ActionArgs();

            args.Controller      = "CalDateType";
            args.View            = dataView;
            args.Values          = CreateFieldValues(theCalDateType, original_CalDateType);
            args.LastCommandName = lastCommandName;
            args.CommandName     = commandName;
            ActionResult result = ControllerFactory.CreateDataController().Execute("CalDateType", dataView, args);

            result.RaiseExceptionIfErrors();
            result.AssignTo(theCalDateType);
            return(result.RowsAffected);
        }
Beispiel #3
0
 public static List <MyCompany.Data.Objects.CalDateType> Select(MyCompany.Data.Objects.CalDateType qbe)
 {
     return(new CalDateTypeFactory().Select(qbe));
 }
Beispiel #4
0
 public virtual int Delete(MyCompany.Data.Objects.CalDateType theCalDateType)
 {
     return(ExecuteAction(theCalDateType, theCalDateType, "Select", "Delete", DeleteView));
 }
Beispiel #5
0
 public virtual int Insert(MyCompany.Data.Objects.CalDateType theCalDateType)
 {
     return(ExecuteAction(theCalDateType, new CalDateType(), "New", "Insert", InsertView));
 }
Beispiel #6
0
 public virtual int Update(MyCompany.Data.Objects.CalDateType theCalDateType)
 {
     return(Update(theCalDateType, SelectSingle(theCalDateType.CalDateTypeId)));
 }
Beispiel #7
0
 public virtual int Update(MyCompany.Data.Objects.CalDateType theCalDateType, MyCompany.Data.Objects.CalDateType original_CalDateType)
 {
     return(ExecuteAction(theCalDateType, original_CalDateType, "Edit", "Update", UpdateView));
 }
Beispiel #8
0
 public List <MyCompany.Data.Objects.CalDateType> Select(MyCompany.Data.Objects.CalDateType qbe)
 {
     return(Select(qbe.CalDateTypeId, qbe.Code));
 }