Пример #1
0
        private int GetValidationErrorID()
        {
            var ws       = new WorkOrderSelect(_woID);
            int woStatus = ws.WoStatus();

            return(woStatus == (int)NJobStatus.woApproved ? 0 : 1503);
        }
Пример #2
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;
        }
Пример #3
0
        public override int GetValidationErrorID()
        {
            var ws = new WorkOrderSelect(_woID);

            return(ws.IsLocked() ? 0 : 1502);
        }
Пример #4
0
        public virtual int GetValidationErrorID()
        {
            var ws = new WorkOrderSelect(_woID);

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