Esempio n. 1
0
        protected virtual int ExecuteAction(MyCompany.Data.Objects.TYMForcastImport theTYMForcastImport, MyCompany.Data.Objects.TYMForcastImport original_TYMForcastImport, string lastCommandName, string commandName, string dataView)
        {
            ActionArgs args = new ActionArgs();

            args.Controller      = "TYMForcastImport";
            args.View            = dataView;
            args.Values          = CreateFieldValues(theTYMForcastImport, original_TYMForcastImport);
            args.LastCommandName = lastCommandName;
            args.CommandName     = commandName;
            ActionResult result = ControllerFactory.CreateDataController().Execute("TYMForcastImport", dataView, args);

            result.RaiseExceptionIfErrors();
            result.AssignTo(theTYMForcastImport);
            return(result.RowsAffected);
        }
Esempio n. 2
0
        protected virtual FieldValue[] CreateFieldValues(MyCompany.Data.Objects.TYMForcastImport theTYMForcastImport, MyCompany.Data.Objects.TYMForcastImport original_TYMForcastImport)
        {
            List <FieldValue> values = new List <FieldValue>();

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