private void _toggleReadOnlyProps(bool IsReadOnly, CswNbtPropertySetRequestItem ItemInstance)
 {
     ItemInstance.Request.setReadOnly(value: IsReadOnly, SaveToDb: true);
     ItemInstance.Location.setReadOnly(value: IsReadOnly, SaveToDb: true);
     ItemInstance.Number.setReadOnly(value: IsReadOnly, SaveToDb: true);
     ItemInstance.toggleReadOnlyProps(IsReadOnly, ItemInstance);
 }
예제 #2
0
 public override void toggleReadOnlyProps(bool IsReadOnly, CswNbtPropertySetRequestItem ItemInstance)
 {
     if (null != ItemInstance)
     {
         CswNbtObjClassRequestContainerUpdate ThisRequest = (CswNbtObjClassRequestContainerUpdate)ItemInstance;
         ThisRequest.Type.setReadOnly(value: IsReadOnly, SaveToDb: true);
         ThisRequest.Container.setReadOnly(value: IsReadOnly, SaveToDb: true);
     }
 }
 /// <summary>
 /// Abstract override to toggle read only properties
 /// </summary>
 public override void toggleReadOnlyProps(bool IsReadOnly, CswNbtPropertySetRequestItem ItemInstance)
 {
     if (null != ItemInstance)
     {
         CswNbtObjClassRequestContainerDispense ThisRequest = (CswNbtObjClassRequestContainerDispense)ItemInstance;
         ThisRequest.Quantity.setReadOnly(value: IsReadOnly, SaveToDb: true);
         ThisRequest.Container.setReadOnly(value: IsReadOnly, SaveToDb: true);
         ThisRequest.Material.setReadOnly(value: IsReadOnly, SaveToDb: true);
     }
 }
예제 #4
0
        /// <summary>
        ///
        /// </summary>
        public override void toggleReadOnlyProps(bool IsReadOnly, CswNbtPropertySetRequestItem ItemInstance)
        {
            if (null != ItemInstance)
            {
                CswNbtObjClassRequestMaterialCreate ThisRequest = (CswNbtObjClassRequestMaterialCreate)ItemInstance;

                ThisRequest.Material.setReadOnly(value: IsReadOnly, SaveToDb: true);
                ThisRequest.NewMaterialType.setReadOnly(value: IsReadOnly, SaveToDb: true);
                ThisRequest.NewMaterialSupplier.setReadOnly(value: IsReadOnly, SaveToDb: true);
                ThisRequest.NewMaterialTradename.setReadOnly(value: IsReadOnly, SaveToDb: true);
                ThisRequest.NewMaterialPartNo.setReadOnly(value: IsReadOnly, SaveToDb: true);
            }
        }
        /// <summary>
        /// Copy the Request Item
        /// </summary>
        public CswNbtPropertySetRequestItem copyNode(bool ClearRequest = true)
        {
            CswNbtPropertySetRequestItem RetCopy = _CswNbtResources.Nodes.makeNodeFromNodeTypeId(NodeTypeId, delegate(CswNbtNode NewNode)
            {
                NewNode.copyPropertyValues(Node);
                ((CswNbtPropertySetRequestItem)NewNode).Status.Value = Statuses.Pending;
                if (ClearRequest)
                {
                    ((CswNbtPropertySetRequestItem)NewNode).Request.RelatedNodeId = null;
                }
                _toggleReadOnlyProps(false, NewNode);
                //if( PostChanges )
                //{
                //    RetCopy.postChanges( true );
                //}
            });

            return(RetCopy);
        }
 /// <summary>
 /// Cast a Request Item PropertySet back to an Object Class
 /// </summary>
 public static CswNbtObjClassRequestMaterialDispense fromPropertySet(CswNbtPropertySetRequestItem PropertySet)
 {
     return(PropertySet.Node);
 }
 /// <summary>
 /// Cast a Request Item PropertySet back to an Object Class
 /// </summary>
 public static CswNbtObjClassRequestContainerDispense fromPropertySet(CswNbtPropertySetRequestItem PropertySet)
 {
     return(PropertySet.Node);
 }
 /// <summary>
 /// Change the ReadOnly state of Properties
 /// </summary>
 public abstract void toggleReadOnlyProps(bool IsReadOnly, CswNbtPropertySetRequestItem ItemInstance);