public ActionResult AddProduct(int PriceListId, int?SalesOrderHeaderId, int CustomerId, int ShipToId, int ContactId, DateTime Date, DateTime NeedByDate, string Observations, string Terms)
        {
            if (SalesOrderHeaderId == null || SalesOrderHeaderId == 0)
            {
                var customer = db.Customers.Where(c => c.CustomerId == CustomerId).FirstOrDefault();
                var shipto   = db.ShipToes.Where(s => s.ShipToId == ShipToId).FirstOrDefault();
                var contact  = db.Contacts.Where(c => c.ContactId == ContactId).FirstOrDefault();

                var view = new NewOrderView
                {
                    SalesOrderHeaderId      = 0,
                    ConNum                  = contact.ConNum,
                    ContactId               = contact.ContactId,
                    CreditHold              = customer.CreditHold,
                    CustId                  = customer.CustId,
                    CustomerId              = customer.CustomerId,
                    Observations            = Observations,
                    OrderNum                = 0,
                    Platform                = "WEB",
                    PriceListId             = PriceListId,
                    RowMod                  = "C",
                    SalesOrderHeaderInterId = 0,
                    ShipToId                = shipto.ShipToId,
                    ShipToNum               = shipto.ShipToNum,
                    UserId                  = 1,
                    VendorId                = 74,
                    Date       = Date,
                    NeedByDate = NeedByDate,
                    TermsCode  = Terms
                };
                MovementsHelper.CreateNewOrderNew(view);
            }
            else
            {
                var view = db.NewOrderView.Find(SalesOrderHeaderId);
                view.PriceListId  = PriceListId;
                view.Date         = Date;
                view.Observations = Observations;
                view.NeedByDate   = NeedByDate;
                db.SaveChanges();
            }


            //var CustomerPriceList = db.CustomerPriceLists.Where(c => c.CustomerId == CustomerID).OrderBy(c => c.CustomerId).ToList();
            ViewBag.PriceListId = new SelectList(db.PriceLists.Where(p => p.PriceListId == PriceListId), "PriceListId", "ListDescription", PriceListId);
            ViewBag.PartId      = new SelectList(CombosHelper.GetPriceListPart(PriceListId), "PartId", "PartDescription");
            //ViewBag.PriceListPartId=
            return(View());
        }