Ejemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("ReceiveId,ReceiveNo,PackingMonth,Model,Consignment,CommissionFrom,CommissionTo,Shop,CustomEntryNo,InvoiceNo,DateToProduction,PartNo,PartDescription,Qty,Amount,Qpv,Um,PartType")] PartReceive partReceive)
        {
            if (id != partReceive.ReceiveId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(partReceive);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PartReceiveExists(partReceive.ReceiveId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Details), new { id = id }));
            }
            return(View(partReceive));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("ReceiveId,ReceiveNo,PackingMonth,Model,Consignment,CommissionFrom,CommissionTo,Shop,CustomEntryNo,InvoiceNo,DateToProduction,PartNo,PartDescription,Qty,Amount,Qpv,Um,PartType")] PartReceive partReceive)
        {
            if (ModelState.IsValid)
            {
                _context.Add(partReceive);
                await _context.SaveChangesAsync();

                var id = partReceive.ReceiveId;
                return(RedirectToAction(nameof(Details), new { id = id }));
            }
            return(View(partReceive));
        }