public ChangeOrder TransformToChangeOrder() { ChangeOrder co = null; // See if it has already been transformed into a // Change Order...it can only be changed once! if (!this.HasBeenTransformedToChangeOrder) { Project project = ProjectService.GetProject(this.ProjectKey); co = NumberedProjectChildFactory.CreateNumberedProjectChild <ChangeOrder>(project); co.AmountChanged = this.amountChanged; co.ArchitectSignatureDate = this.architectSignatureDate; co.ChangeType = this.changeType; co.Contractor = this.contractor; co.ContractorSignatureDate = this.contractorSignatureDate; co.Description = this.description; co.OwnerSignatureDate = this.ownerSignatureDate; co.PriceChangeDirection = this.priceChangeDirection; co.TimeChanged = this.timeChanged; co.TimeChangeDirection = this.timeChangeDirection; } else { // It was already changed, so get the Change Order that it was // changed into co = ChangeOrderService.GetChangeOrder(this.changeOrderKey); } // Get the key of the Change Order this.changeOrderKey = co.Key; // Return the instance return(co); }
public static object[] getNumberSchemes(VDF.Vault.Currency.Connections.Connection connection, string objType, NumSchmType numSchemeType) { try { LibNotes(); switch (objType) { case "File": { DocumentService fserv = connection.WebServiceManager.DocumentService; nSchemes = fserv.GetAllFileNamingSchemes(); return(nSchemes); } case "Change Order": { ChangeOrderService cOrder = connection.WebServiceManager.ChangeOrderService; nSchemes = cOrder.GetNumberingSchemesByType(numSchemeType); return(nSchemes); } case "Item": { ItemService iServ = connection.WebServiceManager.ItemService; nSchemes = iServ.GetNumberingSchemesByType(numSchemeType); return(nSchemes); } case "All": { DocumentService fserv = connection.WebServiceManager.DocumentService; nSchemes = fserv.GetAllFileNamingSchemes(); ChangeOrderService cOrder = connection.WebServiceManager.ChangeOrderService; nSchemes = cOrder.GetNumberingSchemesByType(numSchemeType); ItemService iServ = connection.WebServiceManager.ItemService; nSchemes = iServ.GetNumberingSchemesByType(numSchemeType); break; } } } catch (SystemException ex) { Debug.Write(ex.ToString()); } return(nSchemes); }
protected override void SaveCurrentEntity(object sender, EventArgs e) { this.routingItemsViewModel.AddBoundRoutingItemsToEntity(); ChangeOrderService.SaveChangeOrder(this.CurrentEntity); }
protected override List <ChangeOrder> GetEntitiesList() { return(new List <ChangeOrder>( ChangeOrderService.GetChangeOrders(UserSession.CurrentProject))); }