Exemple #1
0
        protected virtual FieldValue[] CreateFieldValues(MyCompany.Data.Objects.WorkingDate theWorkingDate, MyCompany.Data.Objects.WorkingDate original_WorkingDate)
        {
            List <FieldValue> values = new List <FieldValue>();

            values.Add(new FieldValue("AutoId", original_WorkingDate.AutoId, theWorkingDate.AutoId, true));
            values.Add(new FieldValue("WorkDate", original_WorkingDate.WorkDate, theWorkingDate.WorkDate));
            values.Add(new FieldValue("StatusId", original_WorkingDate.StatusId, theWorkingDate.StatusId));
            values.Add(new FieldValue("WorkTypeId", original_WorkingDate.WorkTypeId, theWorkingDate.WorkTypeId));
            return(values.ToArray());
        }
Exemple #2
0
        protected virtual int ExecuteAction(MyCompany.Data.Objects.WorkingDate theWorkingDate, MyCompany.Data.Objects.WorkingDate original_WorkingDate, string lastCommandName, string commandName, string dataView)
        {
            ActionArgs args = new ActionArgs();

            args.Controller      = "WorkingDate";
            args.View            = dataView;
            args.Values          = CreateFieldValues(theWorkingDate, original_WorkingDate);
            args.LastCommandName = lastCommandName;
            args.CommandName     = commandName;
            ActionResult result = ControllerFactory.CreateDataController().Execute("WorkingDate", dataView, args);

            result.RaiseExceptionIfErrors();
            result.AssignTo(theWorkingDate);
            return(result.RowsAffected);
        }
Exemple #3
0
 public static List <MyCompany.Data.Objects.WorkingDate> Select(MyCompany.Data.Objects.WorkingDate qbe)
 {
     return(new WorkingDateFactory().Select(qbe));
 }
Exemple #4
0
 public virtual int Delete(MyCompany.Data.Objects.WorkingDate theWorkingDate)
 {
     return(ExecuteAction(theWorkingDate, theWorkingDate, "Select", "Delete", DeleteView));
 }
Exemple #5
0
 public virtual int Insert(MyCompany.Data.Objects.WorkingDate theWorkingDate)
 {
     return(ExecuteAction(theWorkingDate, new WorkingDate(), "New", "Insert", InsertView));
 }
Exemple #6
0
 public virtual int Update(MyCompany.Data.Objects.WorkingDate theWorkingDate)
 {
     return(Update(theWorkingDate, SelectSingle(theWorkingDate.AutoId)));
 }
Exemple #7
0
 public virtual int Update(MyCompany.Data.Objects.WorkingDate theWorkingDate, MyCompany.Data.Objects.WorkingDate original_WorkingDate)
 {
     return(ExecuteAction(theWorkingDate, original_WorkingDate, "Edit", "Update", UpdateView));
 }
Exemple #8
0
 public List <MyCompany.Data.Objects.WorkingDate> Select(MyCompany.Data.Objects.WorkingDate qbe)
 {
     return(Select(qbe.AutoId, qbe.WorkDate, qbe.StatusId, qbe.WorkTypeId));
 }