public purch_requisitionnote BuildPurchRequisionNoteObject(AddUpdateRequisitionNoteCommand request, int staffID, int companyId) { return(new purch_requisitionnote { Total = request.Total, PurchaseReqNoteId = request.PurchaseReqNoteId, Active = true, ApprovalStatusId = (int)ApprovalStatus.Processing, Comment = request.Comment, CreatedBy = request.RequestBy, RequestBy = request.RequestBy, Deleted = false, CompanyId = companyId, CreatedOn = DateTime.Now, DeliveryLocation = request.DeliveryLocation, DepartmentId = request.DepartmentId, Description = request.Description, DocumentNumber = request.DocumentNumber, IsFundAvailable = request.IsFundAvailable, ExpectedDeliveryDate = request.ExpectedDeliveryDate, UpdatedBy = request.RequestBy, UpdatedOn = DateTime.Today, PRNNumber = $"{DateTime.Now.Month}{DateTime.Now.Day}{PRNNumber.Generate(10)}", StaffId = staffID }); }
public async Task <ActionResult> ADD_PURCHASE_REQ_NOTE([FromBody] AddUpdateRequisitionNoteCommand command) { var resp = await _mediator.Send(command); if (!resp.Status.IsSuccessful) { return(BadRequest(resp)); } return(Ok(resp)); }