Пример #1
0
        public IActionResult LinkShopWarehouse()

        {
            if (HttpContext.Session.GetString("Id") == null)
            {
                HttpContext.Session.Clear();
                return(RedirectToAction("Index", "Account"));
            }



            Gettablewarehouse get = new Gettablewarehouse(_context);

            IEnumerable <tableshopwarehouse> bussinessEntitiesList = get.gettable();
            int       type = 2;//for warehouse
            GetEntity ga   = new GetEntity(_context);
            IEnumerable <BusinessEntity> warehouses = ga.getBussinessEntities(type);

            ViewData["warehousfree"] = warehouses;
            type = 1;
            IEnumerable <BusinessEntity> shops = ga.getBussinessEntities(type);
            IEnumerable <BusinessEntity> shopsnotassociated = ga.getnotassociatedshops();

            ViewData["shopsfree"] = shopsnotassociated;
            ViewData["table"]     = bussinessEntitiesList;

            return(View());
        }
Пример #2
0
        public IActionResult SelectShop()
        {
            if (HttpContext.Session.GetString("Id") == null)
            {
                HttpContext.Session.Clear();
                return(RedirectToAction("Index", "Account"));
            }

            int       type = 1;//for shop
            GetEntity get  = new GetEntity(_context);
            IEnumerable <BusinessEntity> shops = get.getBussinessEntities(type);

            ViewData["Allshops"] = shops;

            return(View());
        }
Пример #3
0
        public IActionResult stunitdphead(int type)
        {
            if (HttpContext.Session.GetString("Id") == null)
            {
                HttpContext.Session.Clear();
                return(RedirectToAction("Index", "Account"));
            }


            //  @model List< MadetoMeasureT.Models.BusinessEntity >

            GetEntity ga = new GetEntity(_context);
            IEnumerable <BusinessEntity> categories = ga.getBussinessEntities(type);

            //  List<BusinessEntity> blist = new List<BusinessEntity>();
            //   blist = ga.getBussinessEntities(type);
            ViewData["stunitid"] = categories;
            return(View());
        }
Пример #4
0
        public IActionResult AddStitchingunitEmployee()

        {
            if (HttpContext.Session.GetString("Id") == null)
            {
                HttpContext.Session.Clear();
                return(RedirectToAction("Index", "Account"));
            }



            int type = 3;//forstitchingunit

            GetEntity ga = new GetEntity(_context);
            IEnumerable <BusinessEntity> categories = ga.getBussinessEntities(type);

            ViewData["stunitid"] = categories;
            return(View());
        }