Пример #1
0
        protected virtual int ExecuteAction(MyCompany.Data.Objects.NMTForcastImport theNMTForcastImport, MyCompany.Data.Objects.NMTForcastImport original_NMTForcastImport, string lastCommandName, string commandName, string dataView)
        {
            ActionArgs args = new ActionArgs();

            args.Controller      = "NMTForcastImport";
            args.View            = dataView;
            args.Values          = CreateFieldValues(theNMTForcastImport, original_NMTForcastImport);
            args.LastCommandName = lastCommandName;
            args.CommandName     = commandName;
            ActionResult result = ControllerFactory.CreateDataController().Execute("NMTForcastImport", dataView, args);

            result.RaiseExceptionIfErrors();
            result.AssignTo(theNMTForcastImport);
            return(result.RowsAffected);
        }
Пример #2
0
        protected virtual FieldValue[] CreateFieldValues(MyCompany.Data.Objects.NMTForcastImport theNMTForcastImport, MyCompany.Data.Objects.NMTForcastImport original_NMTForcastImport)
        {
            List <FieldValue> values = new List <FieldValue>();

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