Example #1
0
        protected virtual FieldValue[] CreateFieldValues(MyCompany.Data.Objects.OrdersForcast theOrdersForcast, MyCompany.Data.Objects.OrdersForcast original_OrdersForcast)
        {
            List <FieldValue> values = new List <FieldValue>();

            values.Add(new FieldValue("AutoId", original_OrdersForcast.AutoId, theOrdersForcast.AutoId, true));
            values.Add(new FieldValue("OrderBy", original_OrdersForcast.OrderBy, theOrdersForcast.OrderBy));
            values.Add(new FieldValue("DeliveryDestination", original_OrdersForcast.DeliveryDestination, theOrdersForcast.DeliveryDestination));
            values.Add(new FieldValue("DeliveryDestnationCode", original_OrdersForcast.DeliveryDestnationCode, theOrdersForcast.DeliveryDestnationCode));
            values.Add(new FieldValue("CustomerMatCode", original_OrdersForcast.CustomerMatCode, theOrdersForcast.CustomerMatCode));
            values.Add(new FieldValue("PartsDevision", original_OrdersForcast.PartsDevision, theOrdersForcast.PartsDevision));
            values.Add(new FieldValue("CustomerPO", original_OrdersForcast.CustomerPO, theOrdersForcast.CustomerPO));
            values.Add(new FieldValue("Key1", original_OrdersForcast.Key1, theOrdersForcast.Key1));
            values.Add(new FieldValue("Key2", original_OrdersForcast.Key2, theOrdersForcast.Key2));
            values.Add(new FieldValue("Key3", original_OrdersForcast.Key3, theOrdersForcast.Key3));
            values.Add(new FieldValue("ReliabilityDevision", original_OrdersForcast.ReliabilityDevision, theOrdersForcast.ReliabilityDevision));
            values.Add(new FieldValue("DeliveryDate", original_OrdersForcast.DeliveryDate, theOrdersForcast.DeliveryDate));
            values.Add(new FieldValue("Quantity", original_OrdersForcast.Quantity, theOrdersForcast.Quantity));
            values.Add(new FieldValue("Unit", original_OrdersForcast.Unit, theOrdersForcast.Unit));
            values.Add(new FieldValue("PlngPeriod", original_OrdersForcast.PlngPeriod, theOrdersForcast.PlngPeriod));
            values.Add(new FieldValue("SAPCode", original_OrdersForcast.SAPCode, theOrdersForcast.SAPCode));
            values.Add(new FieldValue("CustomerId", original_OrdersForcast.CustomerId, theOrdersForcast.CustomerId));
            values.Add(new FieldValue("CreateBy", original_OrdersForcast.CreateBy, theOrdersForcast.CreateBy));
            values.Add(new FieldValue("CreateDate", original_OrdersForcast.CreateDate, theOrdersForcast.CreateDate));
            values.Add(new FieldValue("UpdateBy", original_OrdersForcast.UpdateBy, theOrdersForcast.UpdateBy));
            values.Add(new FieldValue("UpdateDate", original_OrdersForcast.UpdateDate, theOrdersForcast.UpdateDate));
            return(values.ToArray());
        }
Example #2
0
        protected virtual int ExecuteAction(MyCompany.Data.Objects.OrdersForcast theOrdersForcast, MyCompany.Data.Objects.OrdersForcast original_OrdersForcast, string lastCommandName, string commandName, string dataView)
        {
            ActionArgs args = new ActionArgs();

            args.Controller      = "OrdersForcast";
            args.View            = dataView;
            args.Values          = CreateFieldValues(theOrdersForcast, original_OrdersForcast);
            args.LastCommandName = lastCommandName;
            args.CommandName     = commandName;
            ActionResult result = ControllerFactory.CreateDataController().Execute("OrdersForcast", dataView, args);

            result.RaiseExceptionIfErrors();
            result.AssignTo(theOrdersForcast);
            return(result.RowsAffected);
        }
Example #3
0
 public virtual int Delete(MyCompany.Data.Objects.OrdersForcast theOrdersForcast)
 {
     return(ExecuteAction(theOrdersForcast, theOrdersForcast, "Select", "Delete", DeleteView));
 }
Example #4
0
 public virtual int Insert(MyCompany.Data.Objects.OrdersForcast theOrdersForcast)
 {
     return(ExecuteAction(theOrdersForcast, new OrdersForcast(), "New", "Insert", InsertView));
 }
Example #5
0
 public virtual int Update(MyCompany.Data.Objects.OrdersForcast theOrdersForcast)
 {
     return(Update(theOrdersForcast, SelectSingle(theOrdersForcast.AutoId)));
 }
Example #6
0
 public virtual int Update(MyCompany.Data.Objects.OrdersForcast theOrdersForcast, MyCompany.Data.Objects.OrdersForcast original_OrdersForcast)
 {
     return(ExecuteAction(theOrdersForcast, original_OrdersForcast, "Edit", "Update", UpdateView));
 }
Example #7
0
 public List <MyCompany.Data.Objects.OrdersForcast> Select(MyCompany.Data.Objects.OrdersForcast qbe)
 {
     return(Select(qbe.AutoId, qbe.OrderBy, qbe.DeliveryDestination, qbe.DeliveryDestnationCode, 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.CustomerId, qbe.CreateBy, qbe.CreateDate, qbe.UpdateBy, qbe.UpdateDate));
 }
Example #8
0
 public static List <MyCompany.Data.Objects.OrdersForcast> Select(MyCompany.Data.Objects.OrdersForcast qbe)
 {
     return(new OrdersForcastFactory().Select(qbe));
 }