public ActionResult _Create(int Id) //Id ==>Sale Order Header Id
        {
            int ProductTypeId = (from p in db.Product
                                 where p.ProductId == Id
                                 select new
            {
                ProductTypeId = p.ProductGroup.ProductTypeId
            }).FirstOrDefault().ProductTypeId;

            ProductConsumptionLineViewModel s = new ProductConsumptionLineViewModel();

            s.BaseProductId = Id;

            var settings = new ProductTypeSettingsService(_unitOfWork).GetProductTypeSettingsForDocument(ProductTypeId);

            s.ProductTypeSettings = Mapper.Map <ProductTypeSettings, ProductTypeSettingsViewModel>(settings);

            var MainContens         = _BomDetailService.GetConsumptionForIndex(Id);
            var LastMainContentLine = (from L in MainContens
                                       orderby L.BomDetailId descending
                                       select new
            {
                BomDetailId = L.BomDetailId,
                ProductId = L.ProductId
            }).FirstOrDefault();

            if (LastMainContentLine != null)
            {
                s.ProductId = LastMainContentLine.ProductId;
            }

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