public ActionResult Supplier(int id)
        {
            var supplier = rpsupplier.Find(id);
            SupplierExpiryWrapVM model = new SupplierExpiryWrapVM();

            model.SupplierList     = Suppliers();
            model.ExpiryResultList = new List <ExpiryResultVM>();
            if (supplier != null)
            {
                model.ExpiryResultList = rpsupplierexpiry
                                         .GetListWithQuery(x => x.SupplierID == id)
                                         .OrderBy(x => x.ExpiryDate)
                                         .Select(x => new ExpiryResultVM
                {
                    ID          = x.ID,
                    ExpiryDate  = x.ExpiryDate.ToLongDateString(),
                    SaleDate    = x.AddDate.ToLongDateString(),
                    SalePrice   = x.TotalBuyingPrice,
                    PaidPrice   = x.PaidPrice,
                    ExpiryValue = x.TotalBuyingPrice - x.PaidPrice
                }).ToList();
                model.TotalExpiryValue = supplier.TotalExpiryValue;
                model.SupplierName     = supplier.CompanyName + "  İçin Vadeli Satış Tablosu";
                model.SupplierID       = supplier.ID;
                model.PaidExpiryValue  = supplier.PaidExpiryValue;
            }

            return(View(model));
        }
        public ActionResult Supplier()
        {
            SupplierExpiryWrapVM model = new SupplierExpiryWrapVM();

            model.ExpiryResultList = new List <ExpiryResultVM>();
            model.SupplierList     = Suppliers();
            return(View(model));
        }