Exemplo n.º 1
0
        public static InOrderPos NewACObject(MyCompanyDB dbApp, IACObject parentACObject)
        {
            InOrderPos entity = new InOrderPos();

            entity.InOrderPosID = Guid.NewGuid();
            entity.DefaultValuesACObject();
            InOrder inOrder = parentACObject as InOrder;

            if (inOrder != null)
            {
                if (inOrder.EntityState != System.Data.EntityState.Added &&
                    inOrder.InOrderPos_InOrder != null &&
                    inOrder.InOrderPos_InOrder.Any())
                {
                    entity.Sequence = inOrder.InOrderPos_InOrder.Select(c => c.Sequence).Max() + 1;
                }
                else
                {
                    entity.Sequence = 1;
                }
                entity.InOrder = inOrder;
                inOrder.InOrderPos_InOrder.Add(entity);
            }
            entity.SetInsertAndUpdateInfo(Database.Initials, dbApp);
            return(entity);
        }
 public override void Recycle(IACObject content, IACObject parentACObject, ACValueList parameter, string acIdentifier = "")
 {
     // 9. Reset local members to make this instance reusable when it was taken from the component pool
     using (ACMonitor.Lock(_20015_LockValue))
     {
         _CurrentInOrder = null;
     }
     base.Recycle(content, parentACObject, parameter, acIdentifier);
 }
Exemplo n.º 3
0
        public static Material NewACObject(MyCompanyDB dbApp, IACObject parentACObject)
        {
            Material entity = new Material();

            entity.MaterialID = Guid.NewGuid();
            entity.DefaultValuesACObject();
            entity.SetInsertAndUpdateInfo(Database.Initials, dbApp);
            return(entity);
        }
Exemplo n.º 4
0
        public static InOrder NewACObject(MyCompanyDB dbApp, IACObject parentACObject, string secondaryKey)
        {
            InOrder entity = new InOrder();

            entity.InOrderID = Guid.NewGuid();
            entity.DefaultValuesACObject();
            entity.InOrderDate = DateTime.Now;
            entity.InOrderNo   = secondaryKey;
            entity.SetInsertAndUpdateInfo(Database.Initials, dbApp);
            return(entity);
        }
Exemplo n.º 5
0
 // Optional override: Handle the Function-Result
 public override void TaskCallback(IACPointNetBase sender, ACEventArgs e, IACObject wrapObject)
 {
     if (e != null)
     {
         IACTask           taskEntry = wrapObject as IACTask;
         ACMethodEventArgs eM        = e as ACMethodEventArgs;
         if (taskEntry.State == PointProcessingState.Deleted)
         { /* Task completed: Place here your code */
         }
         else if (eM.ResultState == Global.ACMethodResultState.InProcess &&
                  taskEntry.State == PointProcessingState.Accepted)
         { /* Task running: Place here your code */
         }
         // Starting of a Method failed
         else if (taskEntry.State == PointProcessingState.Rejected)
         { /* Task rejected: Place here your code */
         }
     }
     base.TaskCallback(sender, e, wrapObject);
 }
Exemplo n.º 6
0
 public string GetACUrl(IACObject rootACObject = null)
 {
     return(ACIdentifier);
 }
Exemplo n.º 7
0
 public string GetACUrlComponent(IACObject rootACObject = null)
 {
     throw new NotImplementedException();
 }
 public PWProcFuncOrder(ACClass acType, IACObject content, IACObject parentACObject, ACValueList parameter, string acIdentifier = "")
     : base(acType, content, parentACObject, parameter, acIdentifier)
 {
 }
Exemplo n.º 9
0
 public BSOMaterial(ACClass acType, IACObject content, IACObject parentACObject, ACValueList parameter, string acIdentifier = "")
     : base(acType, content, parentACObject, parameter, acIdentifier)
 {
 }
Exemplo n.º 10
0
 public PAMOrder(ACClass acType, IACObject content, IACObject parentACObject, ACValueList parameter, string acIdentifier = "")
     : base(acType, content, parentACObject, parameter, acIdentifier)
 {
     _PAPointMatIn1  = new PAPoint(this, Const.PAPointMatIn1);
     _PAPointMatOut1 = new PAPoint(this, Const.PAPointMatOut1);
 }