public ActionResult XoaNhap([Bind(Include = "mahanghoa,soluongnhap")] ViewCTNHAPHANGHOA values)
        {
            List <ViewCTNHAPHANGHOA> list = new List <ViewCTNHAPHANGHOA>();

            if (Session["Nhap"] != null)
            {
                list = (List <ViewCTNHAPHANGHOA>)Session["Nhap"];
            }
            var value = list.SingleOrDefault(s => s.MAHANGHOA == values.MAHANGHOA);

            if (value != null)
            {
                list.Remove(value);
            }

            Session["Nhap"] = list;
            return(RedirectToAction("Index"));
        }
        public ActionResult ThemNhap([Bind(Include = "mahanghoa,soluongnhap,tenhanghoa")] ViewCTNHAPHANGHOA values)
        {
            List <ViewCTNHAPHANGHOA> list = new List <ViewCTNHAPHANGHOA>();

            if (Session["Nhap"] != null)
            {
                list = (List <ViewCTNHAPHANGHOA>)Session["Nhap"];
            }
            var value = list.SingleOrDefault(s => s.MAHANGHOA == values.MAHANGHOA);

            if (value == null)
            {
                list.Add(new ViewCTNHAPHANGHOA {
                    MAHANGHOA = values.MAHANGHOA, SOLUONGNHAP = values.SOLUONGNHAP, TENHANGHOA = values.TENHANGHOA
                });
            }

            Session["Nhap"] = list;
            return(RedirectToAction("Index"));
        }