public ActionResult Create(ProductsRowModel productRow)
        {
            ProductsForAdmin rowModel = new ProductsForAdmin()
            {
                ModelId             = productRow.Id,
                Name                = productRow.Name,
                SuppliersId         = productRow.Suppliers,
                CategoryId          = productRow.Category,
                StoreLocationId     = productRow.Store,
                ProductsDescription = productRow.Description,
                UnitsInStock        = productRow.Stock,
                UnitPrice           = productRow.UnitPrice,
                Discount            = productRow.Discount,
                FinalPrice          = productRow.Price,
                Size                = productRow.Size,
                Colour              = productRow.Colour,
                EntryDate           = productRow.EntryDate
            };

            prodCreate.Create(rowModel);


            ViewBag.Message = "Student Details Added Successfully";
            ModelState.Clear();
            return(RedirectToAction("Create"));
        }
        public ActionResult Details(int id)
        {
            // entity from database
            ProductsForAdmin allproducts = this.prodCreate.GetDetails(id);
            // model for view
            ProductsRowModel list = new ProductsRowModel()
            {
                ProductId   = allproducts.Id,
                Name        = allproducts.Name,
                Colour      = allproducts.Colour,
                Suppliers   = allproducts.SuppliersId,
                Category    = allproducts.CategoryId,
                Store       = allproducts.StoreLocationId,
                Size        = allproducts.Size,
                EntryDate   = allproducts.EntryDate,
                Description = allproducts.ProductsDescription,
                Stock       = allproducts.UnitsInStock,
                Discount    = allproducts.Discount,
                Price       = allproducts.FinalPrice,
                UnitPrice   = allproducts.UnitPrice
            };

            return(View(list));
        }