コード例 #1
0
        public async Task <IActionResult> Edit(int id, [Bind("EmployeeFacultyId,Code,Name,UniversityId,University,CreateBy,CreateDate,UpdateBy,UpdateDate,IsActive,IsDelete")] EmployeeFaculty employeeFaculty)
        {
            if (id != employeeFaculty.EmployeeFacultyId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(employeeFaculty);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EmployeeFacultyExists(employeeFaculty.EmployeeFacultyId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(employeeFaculty));
        }
コード例 #2
0
        public async Task <IActionResult> Edit(int id, [Bind("LocationGroupId,Code,Barcode,Name,CreateBy,CreateDate,UpdateBy,UpdateDate,IsActive,IsDelete")] LocationGroup locationGroup)
        {
            if (id != locationGroup.LocationGroupId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(locationGroup);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!LocationGroupExists(locationGroup.LocationGroupId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(locationGroup));
        }
コード例 #3
0
        public async Task <IActionResult> Edit(int id, [Bind("AssetBrandId,Code,Name,CreateBy,CreateDate,UpdateBy,UpdateDate,IsActive,IsDelete")] AssetBrand assetBrand)
        {
            if (id != assetBrand.AssetBrandId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(assetBrand);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AssetBrandExists(assetBrand.AssetBrandId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(assetBrand));
        }
コード例 #4
0
        public async Task <IActionResult> Edit(int id, [Bind("AssetWarrantyId,InvoiceNumber,VoucherNumber,SupplierId,PolicyNumber,ContractNumber,Address,Telphone,WarrantyDuration,WarrantyStart,WarrantyEnd,Premium,Remark,CreateBy,CreateDate,UpdateBy,UpdateDate,IsActive,IsDelete")] AssetWarranty assetWarranty)
        {
            if (id != assetWarranty.AssetWarrantyId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(assetWarranty);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AssetWarrantyExists(assetWarranty.AssetWarrantyId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(assetWarranty));
        }
コード例 #5
0
        public async Task <IActionResult> Edit(int id, [Bind("OwnershipId,CreateBy,CreateDate,UpdateBy,UpdateDate,IsActive,IsDelete")] Ownership ownership)
        {
            if (id != ownership.OwnershipId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(ownership);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!OwnershipExists(ownership.OwnershipId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(ownership));
        }
コード例 #6
0
        public async Task <IActionResult> Edit(int id, [Bind("AssetWarrantyCompanyId,Code,Name,Address,ContactNumber,ContactPerson,Email,CreateBy,CreateDate,UpdateBy,UpdateDate,IsActive,IsDelete")] AssetWarrantyCompany assetWarrantyCompany)
        {
            if (id != assetWarrantyCompany.AssetWarrantyCompanyId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(assetWarrantyCompany);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AssetWarrantyCompanyExists(assetWarrantyCompany.AssetWarrantyCompanyId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(assetWarrantyCompany));
        }