コード例 #1
0
ファイル: UserController.cs プロジェクト: krillinit/PCVWebApp
        public async Task <IActionResult> RequestInfoesCreate([Bind("TodayDate,RequestType,RequestByName,EffectiveStart,EffectiveEnd,RequestId")] Requestinfo requestinfo)
        {
            if (ModelState.IsValid)
            {
                _context.Add(requestinfo);
                await _context.SaveChangesAsync();

                return(RedirectToAction("UserTablesCreate", "User"));
            }
            return(View(requestinfo));
        }
コード例 #2
0
        public async Task <IActionResult> Create([Bind("Username,Password,UserLogId")] User user)
        {
            if (ModelState.IsValid)
            {
                _context.Add(user);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(user));
        }
コード例 #3
0
        public async Task <IActionResult> Create([Bind("ID,Name")] Department department)
        {
            if (ModelState.IsValid)
            {
                _context.Add(department);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(department));
        }
コード例 #4
0
        public async Task <IActionResult> Create([Bind("UserId,LastName,FirstName,Department,Office,ManagerName,IsManager,DateStart,DateEnd")] UserTable userTable)
        {
            if (ModelState.IsValid)
            {
                _context.Add(userTable);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(userTable));
        }
コード例 #5
0
        public async Task <IActionResult> Create([Bind("VmsroleGroupId,AccountGroup,AdminSupport,Assignor,Auditor,CliServiDeptMgr,CliServiGroup,CommercialGroup,ContractorQc,Itgroup,ProcessingShippingGroup,QcsupervisorLead,Qc,SalesGroup,StatusGroup,VendorRelationsGroup")] VmsRolegroup vmsRolegroup)
        {
            if (ModelState.IsValid)
            {
                _context.Add(vmsRolegroup);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(vmsRolegroup));
        }
コード例 #6
0
        public async Task <IActionResult> Create([Bind("UserReqId,FloorNum,CubeNum,DidNum,DualMon,RemoAcc,RemoLap,Mobile,UserStatus,UserName")] UserRequirements userRequirements)
        {
            if (ModelState.IsValid)
            {
                _context.Add(userRequirements);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(userRequirements));
        }
コード例 #7
0
        public async Task <IActionResult> Create([Bind("OtsAccessId,Return,MultiAssign,DeleteOrder,ToReassign,RecreateOrder,AppraisalTagShip,MaintainTagReasons,MaintainClariReasons,AuditAdmin,DisputeQueueAccess")] OtsAccess otsAccess)
        {
            if (ModelState.IsValid)
            {
                _context.Add(otsAccess);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(otsAccess));
        }
コード例 #8
0
        public async Task <IActionResult> Create([Bind("ID,Nome,Checked")] Item item)
        {
            if (ModelState.IsValid)
            {
                _context.Add(item);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(item));
        }
コード例 #9
0
        public async Task <IActionResult> Create([Bind("LrvId,LrvAdmin,FannieQc,RegularQc,AllQueues")] LrvRolegroup lrvRolegroup)
        {
            if (ModelState.IsValid)
            {
                _context.Add(lrvRolegroup);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(lrvRolegroup));
        }
コード例 #10
0
ファイル: ToDoesController.cs プロジェクト: BoboBH/Demo
        public async Task <IActionResult> Create([Bind("Id,Name,IsDone,Priority")] ToDo toDo)
        {
            if (ModelState.IsValid)
            {
                _context.Add(toDo);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(toDo));
        }
コード例 #11
0
        public async Task <IActionResult> Create([Bind("AddiAccessId,Pci,Fdic,Crm,CopyOf")] AddiAccess addiAccess)
        {
            if (ModelState.IsValid)
            {
                _context.Add(addiAccess);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(addiAccess));
        }
コード例 #12
0
        public async Task <IActionResult> Create([Bind("Bpoid,Bpoadmin,ContractQc,FdicQc,HoldOrders,MarkOrdersShipped,QcBasic,QcPlus,QcSupervisor,ViewRules")] BpoRolegroup bpoRolegroup)
        {
            if (ModelState.IsValid)
            {
                _context.Add(bpoRolegroup);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(bpoRolegroup));
        }
コード例 #13
0
        public async Task <IActionResult> Create([Bind("Id,Title,ReleaseDate,Genre,Price,Rating")] Movie movie)
        {
            if (ModelState.IsValid)
            {
                _context.Add(movie);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(movie));
        }
コード例 #14
0
        public async Task <IActionResult> Create([Bind("ID,Title,TrailerUrl,ShortDescription,Genre,LongDescription,Actors")] Movie movie)
        {
            if (ModelState.IsValid)
            {
                _context.Add(movie);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(movie));
        }
コード例 #15
0
        public async Task <IActionResult> Create([Bind("IdLib,Nom,Description,IdCategorie")] Lib lib)
        {
            if (ModelState.IsValid)
            {
                _context.Add(lib);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(lib));
        }
コード例 #16
0
        public async Task <IActionResult> Create([Bind("IdCategorie,Nom")] Categorie categorie)
        {
            if (ModelState.IsValid)
            {
                _context.Add(categorie);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(categorie));
        }
コード例 #17
0
ファイル: ContactsController.cs プロジェクト: BoboBH/Demo
        public async Task <IActionResult> Create([Bind("Id,Name,Address,City,State,Zip,Email,OwnerId,status")] Contact contact)
        {
            if (ModelState.IsValid)
            {
                _context.Add(contact);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(contact));
        }
コード例 #18
0
        public async Task <IActionResult> Create([Bind("AppId,VmsroleGroup,AddAccess,Otsaccess,BporoleGroup,LrvroleGroup,Mas500Access")] Applicationaccess applicationaccess)
        {
            if (ModelState.IsValid)
            {
                _context.Add(applicationaccess);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["AddAccess"]    = new SelectList(_context.AddiAccess, "AddiAccessId", "AddiAccessId", applicationaccess.AddAccess);
            ViewData["BporoleGroup"] = new SelectList(_context.BpoRolegroup, "Bpoid", "Bpoid", applicationaccess.BporoleGroup);
            ViewData["LrvroleGroup"] = new SelectList(_context.LrvRolegroup, "LrvId", "LrvId", applicationaccess.LrvroleGroup);
            ViewData["Otsaccess"]    = new SelectList(_context.OtsAccess, "OtsAccessId", "OtsAccessId", applicationaccess.Otsaccess);
            ViewData["VmsroleGroup"] = new SelectList(_context.VmsRolegroup, "VmsroleGroupId", "VmsroleGroupId", applicationaccess.VmsroleGroup);
            return(View(applicationaccess));
        }
コード例 #19
0
 public async Task InsertAsync(Seller obj)
 {
     _context.Add(obj);
     await _context.SaveChangesAsync();
 }