Пример #1
0
        public async Task <IActionResult> Create([Bind("Date,HolidayName")] HolidayEntry holidayEntry)
        {
            if (ModelState.IsValid)
            {
                _context.Add(holidayEntry);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(holidayEntry));
        }
Пример #2
0
        public async Task <IActionResult> Create([Bind("SerialNumber,Plant,StoreLocation,Material,Description,LatestCalDate,CalStatus,Comment,CalDue,SystemStatus,UserStatus,Room,SuperordEquip,SortField,Machine,ToolkitMachine,ToolkitSloc,LatestSafetyDate,SafetyDue,NeedCal,NeedSafety,RemovedDate,UpdatedDate,InCal,PSN")] ToolInventory toolInventory)
        {
            if (ModelState.IsValid)
            {
                _context.Add(toolInventory);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(toolInventory));
        }
Пример #3
0
        public async Task <IActionResult> Create([Bind("Id,SerialNumber,RegisteredDate,UserShipDate,VenReceiveDate,CalDate,CalResult,VenComment,PlanedShipDate,VenShipDate,UserReceiveDate,CcReceiveDate,CcUploadDate,Tat,Finished,Plant,StdTat,TatStatus")] CalInProcess calInProcess)
        {
            if (ModelState.IsValid)
            {
                _context.Add(calInProcess);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(calInProcess));
        }
Пример #4
0
        public async Task <IActionResult> Create([Bind("Plant,Location1")] Location location)
        {
            if (ModelState.IsValid)
            {
                _context.Add(location);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(location));
        }
        public async Task <IActionResult> Create([Bind("Material,MaterialDescription,CalPlace,CalVendor,CalInterval,Instruction,AddRemove,ChangeDate,NeedCal,NeedSafety,SafetyInterval,PMaker,PName,PModel")] MaterialNeedCal materialNeedCal)
        {
            if (ModelState.IsValid)
            {
                _context.Add(materialNeedCal);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(materialNeedCal));
        }
Пример #6
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            var calDate = await _context.CalDate.FindAsync(id);

            _context.CalDate.Remove(calDate);
            await _context.SaveChangesAsync();

            return(RedirectToAction(nameof(Index)));
        }