private void Received_Click(object sender, EventArgs e)
        {
            POReceiptHeaderModel head = _view.headSeleted;

            if (!string.IsNullOrEmpty(head.ReceiptNum))
            {
                if (head.QCInspectionFlag && head.ReceiptMethod == "RECEIVE")
                {
                    if (head.InspectionStatus.Trim() != "PASS ALL")
                    {
                        MessageBox.Show("QC Inspection status is not PASS. Cannot Received.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }
                }

                IEnumerable <POReceiptLineModel> lines = _view.rcvLines;
                if (lines.Count() > 0)
                {
                    if (ValidateLines(lines))
                    {
                        if (head.ReceiptMethod == "RETURN")
                        {
                            lines = GenerateReturnLines(lines);
                        }

                        if (head.ReceiptMethod == "RECEIVE")
                        {
                            lines = GenerateLotNumber(lines);
                        }

                        GeneratePOLocation(lines);
                        if (GenerateTransaction(lines))
                        {
                            ConfirmPOLocation(lines);

                            head.ReceivedFlag = true;
                            _repository.UpdateRcvHead(head);
                            UpdateReceivedLines(lines);
                            MessageBox.Show("Received process completed.", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                    }
                }
            }

            _view.headSeleted = head;
        }