예제 #1
0
        /**
         *  Is R_Status_ID Valid
         *	@param R_Status_ID id
         *	@return true if valid
         */
        public bool IsR_Status_IDValid(int R_Status_ID)
        {
            if (R_Status_ID == 0)
            {
                return(true);
            }

            _Status = MStatus.Get(GetCtx(), R_Status_ID);
            int R_StatusCategory_ID = _Status.GetR_StatusCategory_ID();
            //
            int R_RequestType_ID = GetR_RequestType_ID();

            if (R_RequestType_ID == 0)
            {
                log.Warning("No Client Request Type");
                return(false);
            }
            MRequestType rt = MRequestType.Get(GetCtx(), R_RequestType_ID);

            if (rt.GetR_StatusCategory_ID() != R_StatusCategory_ID)
            {
                log.Warning("Status Category different - Status("
                            + R_StatusCategory_ID + ") <> RequestType("
                            + rt.GetR_StatusCategory_ID() + ")");
                return(false);
            }
            return(true);
        }
예제 #2
0
 /**
  *  Get Status
  *	@return status or null
  */
 public new MStatus GetStatus()
 {
     if (GetR_Status_ID() == 0)
     {
         _Status = null;
     }
     else if (_Status == null ||
              _Status.GetR_Status_ID() != GetR_Status_ID())
     {
         _Status = MStatus.Get(GetCtx(), GetR_Status_ID());
     }
     return(_Status);
 }