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); }
public Constants.ACTION_STATUS SetDeliveryDate(int retrievalNo, DateTime deliveryDate) { Constants.ACTION_STATUS setStatus = Constants.ACTION_STATUS.UNKNOWN; Retrieval retrieval = retrievalList.Find(delegate(Retrieval r) { return(r.Id == retrievalNo); }); foreach (RetrievalDetail retrievalDetail in retrieval.RetrievalDetails) { Requisition requisition = new Requisition(); requisition.Id = retrievalDetail.Requisition.Id; requisition = requisitionBroker.GetRequisition(requisition); RequisitionCollectionDetail requisitionCollectionDetail = requisitionCollectionBroker.GetRequisitionCollectionDetail(requisition); RequisitionCollection requisitionCollection = new RequisitionCollection(); requisitionCollection.Id = requisitionCollectionDetail.RequisitionCollection.Id; requisitionCollection = requisitionCollectionBroker.GetRequisitionCollection(requisitionCollection); requisitionCollection.DeliveryDate = DateTime.Now; requisitionCollection.DeliveryBy = Util.GetEmployee(employeeBroker); requisitionCollectionBroker.Update(requisitionCollection); } return(setStatus); }