private ActionResult _Modify(int id)
        {
            SaleOrderLine temp = _SaleOrderLineService.GetSaleOrderLine(id);

            if (temp == null)
            {
                return(HttpNotFound());
            }

            #region DocTypeTimeLineValidation
            try
            {
                TimePlanValidation = DocumentValidation.ValidateDocumentLine(new DocumentUniqueId {
                    LockReason = temp.LockReason
                }, User.Identity.Name, out ExceptionMsg, out Continue);
            }
            catch (Exception ex)
            {
                string message = _exception.HandleException(ex);
                TempData["CSEXCL"] += message;
                TimePlanValidation  = false;
            }

            if (!TimePlanValidation)
            {
                TempData["CSEXCL"] += ExceptionMsg;
            }
            #endregion

            if ((TimePlanValidation || Continue))
            {
                ViewBag.LineMode = "Edit";
            }

            SaleOrderHeader H = new SaleOrderHeaderService(_unitOfWork).GetSaleOrderHeader(temp.SaleOrderHeaderId);
            ViewBag.DocNo = H.DocNo;
            SaleOrderLineViewModel s = Mapper.Map <SaleOrderLine, SaleOrderLineViewModel>(temp);

            string BuyerSku = (_SaleOrderLineService.GetBuyerSKU(temp.ProductId, temp.SaleOrderHeaderId));

            s.BuyerSku = BuyerSku;

            var settings = new SaleOrderSettingsService(_unitOfWork).GetSaleOrderSettings(H.DocTypeId, H.DivisionId, H.SiteId);
            s.SaleOrderSettings = Mapper.Map <SaleOrderSettings, SaleOrderSettingsViewModel>(settings);

            s.DocumentTypeSettings = new DocumentTypeSettingsService(_unitOfWork).GetDocumentTypeSettingsForDocument(H.DocTypeId);

            s.UnitId = new ProductService(_unitOfWork).Find(temp.ProductId).UnitId;
            PrepareViewBag(H);

            return(PartialView("_Create", s));
        }