public RequisitionCollectionItem(int id, RequisitionCollection requisition, Item itemId, int qty, DateTime createdDate, Employee createdBy, int status) { this.Id = id; this.RequisitionCollection = requisition; this.Item = itemId; this.Qty = qty; this.CreatedDate = createdDate; this.CreatedBy = createdBy; this.Status = status; }
public RequisitionCollectionItem(int id, RequisitionCollection requisition, Item itemId, int qty, DateTime createdDate, Employee createdBy, int status) { this.Id = id; this.RequisitionCollection = requisition; this.Item = itemId; this.Qty = qty; this.CreatedDate = createdDate; this.CreatedBy = createdBy; this.Status = status; }
public SubmitRequestToStoreControl() { currentEmployee = Util.ValidateUser(Constants.EMPLOYEE_ROLE.DEPARTMENT_REPRESENTATIVE); inventory = new InventoryEntities(); requisitionBroker = new RequisitionBroker(inventory); requisitionCollectionBroker = new RequisitionCollectionBroker(inventory); employeeBroker = new EmployeeBroker(inventory); Employee employee = new Employee(); employee.Id = currentEmployee.Id; employee = employeeBroker.GetEmployee(employee); requisitionCollection = new RequisitionCollection(requisitionCollectionBroker.GetRequisitionCollectionId(), employee.Department, employee.Department.CollectionPoint, DateTime.Now, employee, Converter.objToInt(Constants.COLLECTION_STATUS.NEED_TO_COLLECT)); approvedRequisitionList = requisitionBroker.GetAllRequisition(Constants.REQUISITION_STATUS.APPROVED, currentEmployee.Department); dataColumn = new DataColumn[] { new DataColumn(columnName[0]), new DataColumn(columnName[1]), new DataColumn(columnName[2]), new DataColumn(columnName[3]) }; }
/// <summary> /// Deprecated Method for adding a new object to the RequisitionCollections EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToRequisitionCollections(RequisitionCollection requisitionCollection) { base.AddObject("RequisitionCollections", requisitionCollection); }
/// <summary> /// Create a new RequisitionCollection object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="createdDate">Initial value of the CreatedDate property.</param> /// <param name="status">Initial value of the Status property.</param> public static RequisitionCollection CreateRequisitionCollection(global::System.Int32 id, global::System.DateTime createdDate, global::System.Int32 status) { RequisitionCollection requisitionCollection = new RequisitionCollection(); requisitionCollection.Id = id; requisitionCollection.CreatedDate = createdDate; requisitionCollection.Status = status; return requisitionCollection; }
public RequisitionCollectionDetail(int id, Requisition requisitionId, RequisitionCollection requisitionCollectionId) { this.Id = id; this.Requisition = requisitionId; this.RequisitionCollection = requisitionCollectionId; }
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; }
private void setRequisitionCollection(int collectionId, List<RequisitionCollection> requisitionCollectionList) { foreach (RequisitionCollection requisitionCollection in requisitionCollectionList) { if (requisitionCollection.Id == collectionId) { this.requisitionCollection = requisitionCollection; break; } } }
public Constants.ACTION_STATUS SelectCollection(int collectionId) { Constants.ACTION_STATUS selectStatus = Constants.ACTION_STATUS.UNKNOWN; this.requisitionCollection = null; setRequisitionCollection(collectionId, requisitionCollectionList); if (this.requisitionCollection == null) { setRequisitionCollection(collectionId, collectedRequisitionCollectionList); } if (this.requisitionCollection != null) { selectStatus = Constants.ACTION_STATUS.SUCCESS; } else { selectStatus = Constants.ACTION_STATUS.FAIL; } return selectStatus; }
public RequisitionCollectionDetail(int id, Requisition requisitionId, RequisitionCollection requisitionCollectionId) { this.Id = id; this.Requisition = requisitionId; this.RequisitionCollection = requisitionCollectionId; }