protected virtual int ExecuteAction(MyCompany.Data.Objects.APCForcastMonthTextImport theAPCForcastMonthTextImport, MyCompany.Data.Objects.APCForcastMonthTextImport original_APCForcastMonthTextImport, string lastCommandName, string commandName, string dataView)
        {
            ActionArgs args = new ActionArgs();

            args.Controller      = "APCForcastMonthTextImport";
            args.View            = dataView;
            args.Values          = CreateFieldValues(theAPCForcastMonthTextImport, original_APCForcastMonthTextImport);
            args.LastCommandName = lastCommandName;
            args.CommandName     = commandName;
            ActionResult result = ControllerFactory.CreateDataController().Execute("APCForcastMonthTextImport", dataView, args);

            result.RaiseExceptionIfErrors();
            result.AssignTo(theAPCForcastMonthTextImport);
            return(result.RowsAffected);
        }
        protected virtual FieldValue[] CreateFieldValues(MyCompany.Data.Objects.APCForcastMonthTextImport theAPCForcastMonthTextImport, MyCompany.Data.Objects.APCForcastMonthTextImport original_APCForcastMonthTextImport)
        {
            List <FieldValue> values = new List <FieldValue>();

            values.Add(new FieldValue("AutoId", original_APCForcastMonthTextImport.AutoId, theAPCForcastMonthTextImport.AutoId, true));
            values.Add(new FieldValue("OrderBy", original_APCForcastMonthTextImport.OrderBy, theAPCForcastMonthTextImport.OrderBy));
            values.Add(new FieldValue("DeliveryDestination", original_APCForcastMonthTextImport.DeliveryDestination, theAPCForcastMonthTextImport.DeliveryDestination));
            values.Add(new FieldValue("CustomerMatCode", original_APCForcastMonthTextImport.CustomerMatCode, theAPCForcastMonthTextImport.CustomerMatCode));
            values.Add(new FieldValue("PartsDevision", original_APCForcastMonthTextImport.PartsDevision, theAPCForcastMonthTextImport.PartsDevision));
            values.Add(new FieldValue("CustomerPO", original_APCForcastMonthTextImport.CustomerPO, theAPCForcastMonthTextImport.CustomerPO));
            values.Add(new FieldValue("Key1", original_APCForcastMonthTextImport.Key1, theAPCForcastMonthTextImport.Key1));
            values.Add(new FieldValue("Key2", original_APCForcastMonthTextImport.Key2, theAPCForcastMonthTextImport.Key2));
            values.Add(new FieldValue("Key3", original_APCForcastMonthTextImport.Key3, theAPCForcastMonthTextImport.Key3));
            values.Add(new FieldValue("ReliabilityDevision", original_APCForcastMonthTextImport.ReliabilityDevision, theAPCForcastMonthTextImport.ReliabilityDevision));
            values.Add(new FieldValue("DeliveryDate", original_APCForcastMonthTextImport.DeliveryDate, theAPCForcastMonthTextImport.DeliveryDate));
            values.Add(new FieldValue("Quantity", original_APCForcastMonthTextImport.Quantity, theAPCForcastMonthTextImport.Quantity));
            values.Add(new FieldValue("Unit", original_APCForcastMonthTextImport.Unit, theAPCForcastMonthTextImport.Unit));
            values.Add(new FieldValue("PlngPeriod", original_APCForcastMonthTextImport.PlngPeriod, theAPCForcastMonthTextImport.PlngPeriod));
            values.Add(new FieldValue("SAPCode", original_APCForcastMonthTextImport.SAPCode, theAPCForcastMonthTextImport.SAPCode));
            values.Add(new FieldValue("FileId", original_APCForcastMonthTextImport.FileId, theAPCForcastMonthTextImport.FileId));
            values.Add(new FieldValue("StatusCode", original_APCForcastMonthTextImport.StatusCode, theAPCForcastMonthTextImport.StatusCode));
            return(values.ToArray());
        }
 public virtual int Delete(MyCompany.Data.Objects.APCForcastMonthTextImport theAPCForcastMonthTextImport)
 {
     return(ExecuteAction(theAPCForcastMonthTextImport, theAPCForcastMonthTextImport, "Select", "Delete", DeleteView));
 }
 public virtual int Insert(MyCompany.Data.Objects.APCForcastMonthTextImport theAPCForcastMonthTextImport)
 {
     return(ExecuteAction(theAPCForcastMonthTextImport, new APCForcastMonthTextImport(), "New", "Insert", InsertView));
 }
 public virtual int Update(MyCompany.Data.Objects.APCForcastMonthTextImport theAPCForcastMonthTextImport)
 {
     return(Update(theAPCForcastMonthTextImport, SelectSingle(theAPCForcastMonthTextImport.AutoId)));
 }
 public virtual int Update(MyCompany.Data.Objects.APCForcastMonthTextImport theAPCForcastMonthTextImport, MyCompany.Data.Objects.APCForcastMonthTextImport original_APCForcastMonthTextImport)
 {
     return(ExecuteAction(theAPCForcastMonthTextImport, original_APCForcastMonthTextImport, "Edit", "Update", UpdateView));
 }
 public List <MyCompany.Data.Objects.APCForcastMonthTextImport> Select(MyCompany.Data.Objects.APCForcastMonthTextImport qbe)
 {
     return(Select(qbe.AutoId, qbe.OrderBy, qbe.DeliveryDestination, qbe.CustomerMatCode, qbe.PartsDevision, qbe.CustomerPO, qbe.Key1, qbe.Key2, qbe.Key3, qbe.ReliabilityDevision, qbe.DeliveryDate, qbe.Quantity, qbe.Unit, qbe.PlngPeriod, qbe.SAPCode, qbe.FileId, qbe.StatusCode));
 }
 public static List <MyCompany.Data.Objects.APCForcastMonthTextImport> Select(MyCompany.Data.Objects.APCForcastMonthTextImport qbe)
 {
     return(new APCForcastMonthTextImportFactory().Select(qbe));
 }