public Constants.ACTION_STATUS SetCollectionStatus(Constants.COLLECTION_STATUS collectionStatus, List <string> collectionIdList)
        {
            foreach (string collectionId in collectionIdList)
            {
                RequisitionCollection requisitionCollection = new RequisitionCollection();
                requisitionCollection.Id     = Converter.objToInt(collectionId);
                requisitionCollection        = requisitionCollectionBroker.GetRequisitionCollection(requisitionCollection);
                requisitionCollection.Status = Converter.objToInt(collectionStatus);
                requisitionCollectionBroker.Update(requisitionCollection);
                if (collectionStatus == Constants.COLLECTION_STATUS.UNCOLLECTED)
                {
                    CollectionMissed collectionMissed = new CollectionMissed();
                    collectionMissed.Id          = collectionMissedBroker.GetCollectionMissedId();
                    collectionMissed.Department  = requisitionCollection.Department;
                    collectionMissed.CreatedBy   = Util.GetEmployee(employeeBroker);
                    collectionMissed.CreatedDate = DateTime.Now;
                    collectionMissed.Status      = Converter.objToInt(Constants.VISIBILITY_STATUS.SHOW);
                    collectionMissedBroker.Insert(collectionMissed);
                }
            }



            return(SystemStoreInventorySystemUtil.Constants.ACTION_STATUS.UNKNOWN);
        }
Ejemplo n.º 2
0
        public static string GetCollectionStatusText(Constants.COLLECTION_STATUS collectionStatus)
        {
            string status = null;

            switch (collectionStatus)
            {
            case Constants.COLLECTION_STATUS.NEED_TO_RETRIEVE:
                status = "Need to Retrieve";
                break;

            case Constants.COLLECTION_STATUS.NEED_TO_COLLECT:
                status = "Need to Collect";
                break;

            case Constants.COLLECTION_STATUS.COLLECTED:
                status = "Collected";
                break;

            case Constants.COLLECTION_STATUS.UNCOLLECTED:
                status = "Uncollected";
                break;

            case Constants.COLLECTION_STATUS.INCOMPLETE:
                status = "Incomplete";
                break;
            }
            return(status);
        }
Ejemplo n.º 3
0
        public static Constants.COLLECTION_STATUS objToCollectionStatus(object obj)
        {
            Constants.COLLECTION_STATUS status = Constants.COLLECTION_STATUS.UNKNOWN;

            switch (objToShort(obj))
            {
            case 1:
                status = Constants.COLLECTION_STATUS.NEED_TO_RETRIEVE;
                break;

            case 2:
                status = Constants.COLLECTION_STATUS.NEED_TO_COLLECT;
                break;

            case 3:
                status = Constants.COLLECTION_STATUS.COLLECTED;
                break;

            case 4:
                status = Constants.COLLECTION_STATUS.UNCOLLECTED;
                break;
            }

            return(status);
        }
Ejemplo n.º 4
0
        public List <RequisitionCollection> GetAllRequisitionCollection(Constants.COLLECTION_STATUS collectionStatus)
        {
            try
            {
                int status = Converter.objToInt(collectionStatus);
                requisitionCollectionList = inventory.RequisitionCollections.Where(requisitionCollection => requisitionCollection.Status == status).ToList <RequisitionCollection>();
            }
            catch (Exception e)
            {
                requisitionCollectionList = null;
            }

            return(requisitionCollectionList);
        }