예제 #1
0
        public async Task <IActionResult> Create([Bind("Id,StudentName,RollNo,Math,English,Bangla,Physics,Chemistry,Biology,Religion,HigherMath,Agriculture,Philosophy,Ict")] Mark mark)
        {
            if (ModelState.IsValid)
            {
                _context.Add(mark);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(mark));
        }
예제 #2
0
        public async Task <IActionResult> Create([Bind("Id,pyear,pmonth,studentid,rollid,ammount")] Payment Payment)
        {
            if (ModelState.IsValid)
            {
                _context.Add(Payment);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(Payment));
        }
예제 #3
0
        public async Task <IActionResult> Create([Bind("Id,Name,Address,Class")] Student student)
        {
            if (ModelState.IsValid)
            {
                _context.Add(student);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(student));
        }
예제 #4
0
        public async Task <IActionResult> Create([Bind("Id,Name,Rollno,SClass,Year,Studentid")] StudentAccount StudentAccount)
        {
            if (ModelState.IsValid)
            {
                _context.Add(StudentAccount);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(StudentAccount));
        }
예제 #5
0
        public async Task <IActionResult> create([Bind("Id,email,password,actor_id")] login login)
        {
            if (ModelState.IsValid)
            {
                _context.Add(login);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(login));
        }
예제 #6
0
        public async Task <IActionResult> Create([Bind("Id,Name,Birthday,Gander,Email,Weight,Parmanent_address,Present_address,Previous_school,Mother_name,Mother_phone,Mother_occupation,Father_name,Father_phone,Father_profession,Father_email")] admission admission)
        {
            if (ModelState.IsValid)
            {
                _context.Add(admission);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(admission));
        }
예제 #7
0
        public async Task <IActionResult> Create([Bind("Id,name,roll,rollid,totalammount,due")] Paymentinfo Paymentinfo)
        {
            if (ModelState.IsValid)
            {
                Paymentinfo b = new Paymentinfo {
                    name         = Paymentinfo.name,
                    roll         = Paymentinfo.roll,
                    rollid       = Paymentinfo.rollid,
                    totalammount = Paymentinfo.totalammount,
                    Due          = 500 - Paymentinfo.totalammount
                };
                _context.Add(b);

                await _context.SaveChangesAsync();

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