C# Class Purchasing.Mvc.Controllers.OrderController

Controller for the Order class
Inheritance: ApplicationController
Show file Open project: ucdavis/Purchasing

Public Methods

Method Description
AssignAccountsPayableUser ( int id ) : System.Web.Mvc.ActionResult

Access checks done inside method.

DeleteSavedOrder ( System.Guid id ) : System.Web.Mvc.ActionResult
GetKfsStatus ( int id ) : JsonNetResult

Calls the Campus Financial System to get updated status on order

GetPeeps ( int id, string orderStatusCodeId ) : JsonNetResult

Get a list of people who have access to approve an order at a particular status

GetReceiveHistory ( int id, int lineItemId, bool payInvoice ) : JsonNetResult
GetRequesters ( int id ) : ActionResult
Index ( ) : ActionResult

#1

Lookup ( string id ) : ActionResult

Find an order by request number and redirect to the review page

OrderController ( IRepositoryFactory repositoryFactory, IOrderService orderService, ISecurityService securityService, IDirectorySearchService directorySearchService, IFinancialSystemService financialSystemService, IQueryRepositoryFactory queryRepository, IEventService eventService, IBugTrackingService bugTrackingService, IFileService fileService ) : System
Request ( int id ) : ActionResult

Make an order request #5

Review ( int id ) : ActionResult

Page to review an order and for approving/denying the order.

This page should be used by ad hoc account managers too, but without the link to edit

SaveOrderRequest ( string saveId, string saveName, string formData, string accountData, string preparedFor, int workgroupId ) : JsonNetResult

Save an order request

SavedOrderRequests ( ) : ActionResult
SelectWorkgroup ( ) : ActionResult

If user has more than one workgroup, they select it for their order #2

ViewFile ( Guid fileId ) : ActionResult

Allows a user to download any attachment file by providing the file ID

Private Methods

Method Description
AddAddress ( int workgroupId, WorkgroupAddress workgroupAddress ) : System.Web.Mvc.ActionResult
AddComment ( int id, string comment ) : JsonNetResult
AddVendor ( int workgroupId, WorkgroupVendor vendor ) : System.Web.Mvc.ActionResult
Approve ( int id, string action, string comment, string orderType, string kfsDocType ) : System.Web.Mvc.ActionResult
AssignAccountsPayableUser ( int id, string apUserId ) : System.Web.Mvc.ActionResult
BindOrderModel ( Order order, OrderViewModel model, bool includeLineItemsAndSplits = false ) : void
Cancel ( int id, string comment ) : System.Web.Mvc.ActionResult
CancelCompletedOrder ( int id, string comment ) : System.Web.Mvc.ActionResult
Copy ( int id ) : System.Web.Mvc.ActionResult
Copy ( int id, OrderViewModel model ) : System.Web.Mvc.ActionResult
CreateOrderModifyModel ( Workgroup workgroup ) : OrderModifyModel
DeleteSavedOrder ( System.Guid id, OrderRequestSave orderRequestSave ) : System.Web.Mvc.ActionResult
Edit ( int id ) : System.Web.Mvc.ActionResult
Edit ( int id, OrderViewModel model ) : System.Web.Mvc.ActionResult
FpdComplete ( int id, bool fpdCompleted ) : System.Web.Mvc.ActionResult
GetInactiveAccountsForOrder ( int id ) : List
GetLineItemsAndSplits ( int id ) : JsonNetResult
GetSubAccounts ( int id ) : JsonNetResult
PayAll ( int id ) : ActionResult
PayInvoice ( int id ) : ActionResult
PayInvoice ( int id, int lineItemId, decimal receivedQuantity ) : JsonNetResult
PayInvoiceNote ( int id, int lineItemId, string note ) : JsonNetResult
ReRouteApproval ( int id, int approvalId, string kerb ) : ActionResult
ReceiveAll ( int id ) : ActionResult
ReceiveItems ( int id ) : ActionResult
ReceiveItems ( int id, int lineItemId, decimal receivedQuantity ) : JsonNetResult
ReceiveItemsNotes ( int id, int lineItemId, string note ) : JsonNetResult
Request ( OrderViewModel model ) : ActionResult
RerouteAccountManager ( int id, int approvalId ) : ActionResult
RerouteAccountManager ( int id, int approvalId, string accountManagerId ) : ActionResult
ReroutePurchaser ( int id ) : ActionResult
ReroutePurchaser ( int id, string purchaserId ) : ActionResult
UpdateAttachmentCategory ( int id, Guid guidId, string category ) : JsonNetResult
UpdateNote ( int id, string orderNote ) : JsonNetResult
UpdatePoNumber ( int id, string poNumber ) : JsonNetResult
UpdatePostStatus ( int id, string postStatusValue ) : JsonNetResult
UpdateReferenceNumber ( int id, string referenceNumber ) : JsonNetResult
UpdateTag ( int id, string tag ) : JsonNetResult
UploadFile ( int orderId ) : ActionResult

Method Details

AssignAccountsPayableUser() public method

Access checks done inside method.
public AssignAccountsPayableUser ( int id ) : System.Web.Mvc.ActionResult
id int
return System.Web.Mvc.ActionResult

DeleteSavedOrder() public method

public DeleteSavedOrder ( System.Guid id ) : System.Web.Mvc.ActionResult
id System.Guid
return System.Web.Mvc.ActionResult

GetKfsStatus() public method

Calls the Campus Financial System to get updated status on order
public GetKfsStatus ( int id ) : JsonNetResult
id int Order Id
return JsonNetResult

GetPeeps() public method

Get a list of people who have access to approve an order at a particular status
public GetPeeps ( int id, string orderStatusCodeId ) : JsonNetResult
id int
orderStatusCodeId string
return JsonNetResult

GetReceiveHistory() public method

public GetReceiveHistory ( int id, int lineItemId, bool payInvoice ) : JsonNetResult
id int
lineItemId int
payInvoice bool
return JsonNetResult

GetRequesters() public method

public GetRequesters ( int id ) : ActionResult
id int
return ActionResult

Index() public method

#1
public Index ( ) : ActionResult
return ActionResult

Lookup() public method

Find an order by request number and redirect to the review page
public Lookup ( string id ) : ActionResult
id string
return ActionResult

OrderController() public method

public OrderController ( IRepositoryFactory repositoryFactory, IOrderService orderService, ISecurityService securityService, IDirectorySearchService directorySearchService, IFinancialSystemService financialSystemService, IQueryRepositoryFactory queryRepository, IEventService eventService, IBugTrackingService bugTrackingService, IFileService fileService ) : System
repositoryFactory IRepositoryFactory
orderService IOrderService
securityService ISecurityService
directorySearchService IDirectorySearchService
financialSystemService IFinancialSystemService
queryRepository IQueryRepositoryFactory
eventService IEventService
bugTrackingService IBugTrackingService
fileService IFileService
return System

Request() public method

Make an order request #5
public Request ( int id ) : ActionResult
id int Workgroup Id
return ActionResult

Review() public method

Page to review an order and for approving/denying the order.
This page should be used by ad hoc account managers too, but without the link to edit
public Review ( int id ) : ActionResult
id int
return ActionResult

SaveOrderRequest() public method

Save an order request
public SaveOrderRequest ( string saveId, string saveName, string formData, string accountData, string preparedFor, int workgroupId ) : JsonNetResult
saveId string Save Id, if just updating a save
saveName string Name to remember the save by
formData string Serialized form data
accountData string Serialized JSON of account info
preparedFor string Who can access saved form. If null, current user
workgroupId int Workgroup the save is associated with
return JsonNetResult

SavedOrderRequests() public method

public SavedOrderRequests ( ) : ActionResult
return ActionResult

SelectWorkgroup() public method

If user has more than one workgroup, they select it for their order #2
public SelectWorkgroup ( ) : ActionResult
return ActionResult

ViewFile() public method

Allows a user to download any attachment file by providing the file ID
public ViewFile ( Guid fileId ) : ActionResult
fileId Guid
return ActionResult