Example #1
0
        protected virtual int ExecuteAction(MyCompany.Data.Objects.AATForcastImport theAATForcastImport, MyCompany.Data.Objects.AATForcastImport original_AATForcastImport, string lastCommandName, string commandName, string dataView)
        {
            ActionArgs args = new ActionArgs();

            args.Controller      = "AATForcastImport";
            args.View            = dataView;
            args.Values          = CreateFieldValues(theAATForcastImport, original_AATForcastImport);
            args.LastCommandName = lastCommandName;
            args.CommandName     = commandName;
            ActionResult result = ControllerFactory.CreateDataController().Execute("AATForcastImport", dataView, args);

            result.RaiseExceptionIfErrors();
            result.AssignTo(theAATForcastImport);
            return(result.RowsAffected);
        }
Example #2
0
        protected virtual FieldValue[] CreateFieldValues(MyCompany.Data.Objects.AATForcastImport theAATForcastImport, MyCompany.Data.Objects.AATForcastImport original_AATForcastImport)
        {
            List <FieldValue> values = new List <FieldValue>();

            values.Add(new FieldValue("AutoId", original_AATForcastImport.AutoId, theAATForcastImport.AutoId));
            values.Add(new FieldValue("OrderBy", original_AATForcastImport.OrderBy, theAATForcastImport.OrderBy));
            values.Add(new FieldValue("DeliveryDestination", original_AATForcastImport.DeliveryDestination, theAATForcastImport.DeliveryDestination));
            values.Add(new FieldValue("CustomerMatCode", original_AATForcastImport.CustomerMatCode, theAATForcastImport.CustomerMatCode));
            values.Add(new FieldValue("PartsDevision", original_AATForcastImport.PartsDevision, theAATForcastImport.PartsDevision));
            values.Add(new FieldValue("CustomerPO", original_AATForcastImport.CustomerPO, theAATForcastImport.CustomerPO));
            values.Add(new FieldValue("Key1", original_AATForcastImport.Key1, theAATForcastImport.Key1));
            values.Add(new FieldValue("Key2", original_AATForcastImport.Key2, theAATForcastImport.Key2));
            values.Add(new FieldValue("Key3", original_AATForcastImport.Key3, theAATForcastImport.Key3));
            values.Add(new FieldValue("ReliabilityDevision", original_AATForcastImport.ReliabilityDevision, theAATForcastImport.ReliabilityDevision));
            values.Add(new FieldValue("DeliveryDate", original_AATForcastImport.DeliveryDate, theAATForcastImport.DeliveryDate));
            values.Add(new FieldValue("Quantity", original_AATForcastImport.Quantity, theAATForcastImport.Quantity));
            values.Add(new FieldValue("Unit", original_AATForcastImport.Unit, theAATForcastImport.Unit));
            values.Add(new FieldValue("PlngPeriod", original_AATForcastImport.PlngPeriod, theAATForcastImport.PlngPeriod));
            values.Add(new FieldValue("SAPCode", original_AATForcastImport.SAPCode, theAATForcastImport.SAPCode));
            values.Add(new FieldValue("FileId", original_AATForcastImport.FileId, theAATForcastImport.FileId));
            values.Add(new FieldValue("StatusCode", original_AATForcastImport.StatusCode, theAATForcastImport.StatusCode));
            return(values.ToArray());
        }
Example #3
0
 public virtual int Delete(MyCompany.Data.Objects.AATForcastImport theAATForcastImport)
 {
     return(ExecuteAction(theAATForcastImport, theAATForcastImport, "Select", "Delete", DeleteView));
 }
Example #4
0
 public virtual int Insert(MyCompany.Data.Objects.AATForcastImport theAATForcastImport)
 {
     return(ExecuteAction(theAATForcastImport, new AATForcastImport(), "New", "Insert", InsertView));
 }
Example #5
0
 public virtual int Update(MyCompany.Data.Objects.AATForcastImport theAATForcastImport)
 {
     return(Update(theAATForcastImport, SelectSingle(theAATForcastImport.AutoId)));
 }
Example #6
0
 public virtual int Update(MyCompany.Data.Objects.AATForcastImport theAATForcastImport, MyCompany.Data.Objects.AATForcastImport original_AATForcastImport)
 {
     return(ExecuteAction(theAATForcastImport, original_AATForcastImport, "Edit", "Update", UpdateView));
 }
Example #7
0
 public List <MyCompany.Data.Objects.AATForcastImport> Select(MyCompany.Data.Objects.AATForcastImport 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));
 }
Example #8
0
 public static List <MyCompany.Data.Objects.AATForcastImport> Select(MyCompany.Data.Objects.AATForcastImport qbe)
 {
     return(new AATForcastImportFactory().Select(qbe));
 }