Пример #1
0
        public async Task <IActionResult> Create([Bind("ConfigId,Keyname,Keyvalue,Startdate,Enddate")] Config config)
        {
            if (ModelState.IsValid)
            {
                _context.Add(config);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(config));
        }
Пример #2
0
        public async Task <IActionResult> Create([Bind("ClientId,ClientName,Startdate,Enddate")] Client client)
        {
            if (ModelState.IsValid)
            {
                _context.Add(client);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(client));
        }
Пример #3
0
        public async Task <IActionResult> Create([Bind("SalaryitemId,SalaryitemName,Istaxed,Firmcostrate,Employeecostrate,Defaultvalue,Percentvalue,Incauto,Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,Startdate,Enddate")] Salaryitem salaryitem)
        {
            if (ModelState.IsValid)
            {
                _context.Add(salaryitem);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(salaryitem));
        }
Пример #4
0
        public async Task <IActionResult> Create([Bind("TaxrateId,Salarymin,Salarymax,Maritalstatus,Nchildrenmin,Nchildrenmax,Taxvalue,Startdate,Enddate")] Taxrate taxrate)
        {
            if (ModelState.IsValid)
            {
                _context.Add(taxrate);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Maritalstatus"] = new SelectList(_context.Maritalstatus, "MaritalstatusId", "MaritalstatusName", taxrate.Maritalstatus);
            return(View(taxrate));
        }
Пример #5
0
        public async Task <IActionResult> Create([Bind("EmployeeId,EmployeeName,Nchildren,MaritalstatusId,Startdate,Enddate")] Employee employee)
        {
            if (ModelState.IsValid)
            {
                _context.Add(employee);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["MaritalstatusId"] = new SelectList(_context.Maritalstatus, "MaritalstatusId", "MaritalstatusName", employee.MaritalstatusId);
            return(View(employee));
        }
Пример #6
0
        public async Task <IActionResult> Create([Bind("FinantialconditionId,EmployeeId,Startdate,Enddate")] Finantialcondition finantialcondition)
        {
            if (ModelState.IsValid)
            {
                _context.Add(finantialcondition);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["EmployeeId"] = new SelectList(_context.Employee, "EmployeeId", "EmployeeName", finantialcondition.EmployeeId);
            return(View(finantialcondition));
        }
Пример #7
0
        public async Task <IActionResult> Create([Bind("AllocationId,EmployeeId,ClientId,Dayrate,Startdate,Enddate")] Allocation allocation)
        {
            if (ModelState.IsValid)
            {
                _context.Add(allocation);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ClientId"]   = new SelectList(_context.Client, "ClientId", "ClientName", allocation.ClientId);
            ViewData["EmployeeId"] = new SelectList(_context.Employee, "EmployeeId", "EmployeeName", allocation.EmployeeId);
            return(View(allocation));
        }
Пример #8
0
        public async Task <IActionResult> Create([Bind("FinantialconditionId,SalaryitemId,Itemvalue,Notes,Percentvalue,Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec")] Salarypackage salarypackage)
        {
            if (ModelState.IsValid)
            {
                _context.Add(salarypackage);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["FinantialconditionId"] = new SelectList(_context.Finantialcondition, "FinantialconditionId", "FinantialconditionId", salarypackage.FinantialconditionId);
            ViewData["SalaryitemId"]         = new SelectList(_context.Salaryitem, "SalaryitemId", "SalaryitemName", salarypackage.SalaryitemId);
            return(View(salarypackage));
        }