Exemple #1
0
        private void SetValidationID()
        {
            ValidationID = 0;

            //Lockec
            var wos = new WorkOrderSelect(_woID);

            if (wos.IsLocked())
            {
                ValidationID = (int)NValidationErrorValue.WorkorderLockedCanNotAddNewItem;
                return;
            }

            //IS service or Site check
            var wo = new MyWorkorder(_woID);

            if (wo.Value.woType == (int)NWorkorderType.Service |
                wo.Value.woType == (int)NWorkorderType.Sitecheck |
                wo.Value.woType == (int)NWorkorderType.Production)
            {
                return;
            }

            //IS there a reason
            if (wo.Value.addNewItemReason != null)
            {
                string reason1 = Convert.ToString(wo.Value.addNewItemReason);
                if (reason1.Length >= 10)
                {
                    return;
                }
            }


            ValidationID = (int)NValidationErrorValue.WorkorderAddNewItem;
        }
Exemple #2
0
        public override int GetValidationErrorID()
        {
            var ws = new WorkOrderSelect(_woID);

            return(ws.IsLocked() ? 0 : 1502);
        }
Exemple #3
0
        public virtual int GetValidationErrorID()
        {
            var ws = new WorkOrderSelect(_woID);

            return(!ws.IsLocked() ? 0 : 1501);
        }