public ActionResult Issue(FormCollection collection) { List <Product> productList = (List <Product>)Session["factory_transfer_product_list"]; if (productList != null) { int fromBranchId = 9; int toBranchId = Convert.ToInt32(collection["ToBranchId"]); var user = (ViewUser)Session["user"]; TransferIssue aTransferIssue = new TransferIssue { Products = productList, FromBranchId = fromBranchId, ToBranchId = toBranchId, IssueByUserId = user.UserId, TransferIssueDate = Convert.ToDateTime(collection["TransactionDate"]) }; int rowAffected = _iProductManager.IssueProductToTransfer(aTransferIssue); if (rowAffected > 0) { Session["factory_transfer_product_list"] = null; TempData["message"] = "Transfer Issue Successful!"; } else { TempData["message"] = "Failed to Issue Transfer!"; } } return(View()); }
public int IssueProductToTransfer(TransferIssue aTransferIssue) { int maxTrNo = _iProductGateway.GetMaxTransferRequisitionNoOfCurrentYear(); aTransferIssue.TransferIssueRef = GenerateTransferIssueRef(maxTrNo); int rowAffected = _iProductGateway.IssueProductToTransfer(aTransferIssue); return(rowAffected); }
public bool ApproveTransferIssue(TransferIssue transferIssue) { int rowAffected = _iProductGateway.ApproveTransferIssue(transferIssue); if (rowAffected > 0) { return(true); } return(false); }
public PartialViewResult ViewOrderDetails(int transferIssueId) { try { TransferIssue model = _iProductManager.GetDeliverableTransferIssueById(transferIssueId); return(PartialView("_ViewDeliveryModalPartialPage", model)); } catch (Exception exception) { Log.WriteErrorLog(exception); return(PartialView("_ErrorPartial", exception)); } }
public ActionResult ApproveTransferIssue(FormCollection collection, int id) { int transferIssueId = Convert.ToInt32(collection["TransferIssueId"]); int approveUserId = ((ViewUser)Session["user"]).UserId; DateTime approveDateTime = DateTime.Now; TransferIssue transferIssue = new TransferIssue { ApproveByUserId = approveUserId, TransferIssueId = transferIssueId, ApproveDateTime = approveDateTime }; bool result = _iProductManager.ApproveTransferIssue(transferIssue); if (result) { return(RedirectToAction("PendingTransferIssueList")); } ViewBag.Transfer = _iProductManager.GetTransferIssueList().ToList().Find(n => n.TransferIssueId == transferIssueId); var issueDetails = _iProductManager.GetTransferIssueDetailsById(transferIssueId); return(View(issueDetails)); }
public PartialViewResult ViewOrderDetails(int transferIssueId) { TransferIssue model = _iProductManager.GetDeliverableTransferIssueById(transferIssueId); return(PartialView("_ViewDeliveryModalPartialPage", model)); }