//public ActionResult _Create(int Id) //Id ==>Design Content Header Id
        //{
        //    DesignConsumptionLineViewModel s = new DesignConsumptionLineViewModel();
        //    s.BaseProductId = Id;
        //    s.ContentType = "Contents";
        //    DesignConsumptionLineViewModel temp = _BomDetailService.GetBaseProductDetail(Id);

        //    s.DesignName = temp.DesignName;
        //    s.QualityName = temp.QualityName;
        //    s.Weight = temp.Weight;

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

        public ActionResult _CreateMainContentForBaseProduct(int Id) //Id ==>Design Content Header Id
        {
            DesignConsumptionLineViewModel s = new DesignConsumptionLineViewModel();

            s.BaseProductId = Id;
            s.ContentType   = "Main Contents";
            DesignConsumptionLineViewModel temp = _BomDetailService.GetBaseProductDetail(Id);


            var MainContens         = _BomDetailService.GetDesignConsumptionFaceContentForIndex(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;
                s.ConsumptionPer = 100 - MainContens.Sum(m => m.ConsumptionPer);
            }


            s.DesignName    = temp.DesignName;
            s.DesignId      = temp.DesignId;
            s.QualityName   = temp.QualityName;
            s.Weight        = temp.Weight;
            s.BaseProcessId = new ProcessService(_unitOfWork).Find(ProcessConstants.Weaving).ProcessId;


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