Example #1
0
        public async Task <IActionResult> Create([Bind("UserId,Username,Password,ContactName,Email,Phone,Company,Isadmin")] TblUsers tblUsers)
        {
            AddPageHeader("Add new customer", "");
            if (ModelState.IsValid)
            {
                _context.Add(tblUsers);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(tblUsers));
        }
Example #2
0
        public async Task <IActionResult> Create([Bind("MachineId,Serialnum,Devicemodel,UserId,PriceBw,PriceClr,PriceClrlrg,PrevRdsBw,PrevRdsClr,PrevRdsClrlrg,CurRdsBw,CurRdsClr,CurRdsClrlrg,QtyBw,QtyClr,QtyClrlrg,PrevInvoiceId,PrevInvoiceTotal,CurInvoiceId,CurInvoiceTotal,Status,ContractStart,ContractEnd,CollectionMethod,Location,MinCharge,IsActive,PrintCountBw,PrintCountColor,PrintCountLarge")] TblMachine tblMachine)
        {
            AddPageHeader("Add new meter reads entry", "");

            if (ModelState.IsValid)
            {
                _context.Add(tblMachine);
                await _context.SaveChangesAsync();

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