示例#1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,DealerId,ProductId,UnitPrice,Quantity,DiscountPercent,Discount,Paid,Due,WarehouseId,Remarks")] DealerSale dealerSale)
        {
            if (id != dealerSale.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(dealerSale);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DealerSaleExists(dealerSale.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(dealerSale));
        }
示例#2
0
        public async Task <IActionResult> Edit(int id, [Bind("id,DeliveryCharge,ReceiptName,ChalanName,DefaultWarehouse,DealerPriceChange")] Config config)
        {
            if (id != config.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(config);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ConfigExists(config.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(config));
        }
        public async Task <IActionResult> Edit(string id, [Bind("Name")] ProductGroup productGroup)
        {
            if (id != productGroup.Name)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(productGroup);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ProductGroupExists(productGroup.Name))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(productGroup));
        }
        public async Task <IActionResult> Edit(string id, [Bind("ContactPersonName,CourierShop")] Courier courier)
        {
            if (id != courier.ContactPersonName)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(courier);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CourierExists(courier.ContactPersonName))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(courier));
        }
示例#5
0
        public async Task <IActionResult> Edit(int id, [Bind("GroupName,Name")] ProductCategory productCategory)
        {
            if (id != productCategory.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(productCategory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ProductCategoryExists(productCategory.GroupId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(productCategory));
        }
示例#6
0
        public async Task <IActionResult> Edit(string id, [Bind("Name,Address,Phone,Remarks,ContactPersonName,Country,MadeInCountry,Email,BrandCode")] Brand brand)
        {
            if (id != brand.Name)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(brand);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BrandExists(brand.Name))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(brand));
        }
示例#7
0
        public async Task <IActionResult> Edit(string id, [Bind("StreetAddress,Area,Thana,PostCode,District,Country,Phone,Website,Facebook,Email,ContactPerson,ContactPersonPhone,About,LogoURL,Remarks,ExpireDate,DeliveryCharge,RecieptName,ChalanName")] MyShop myShop)
        {
            if (id != myShop.StreetAddress)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(myShop);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MyShopExists(myShop.StreetAddress))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(myShop));
        }
示例#8
0
        public async Task <IActionResult> Edit(int id, [Bind("id,FirstName,LastName,UserName,Password,Phone")] User user)
        {
            if (id != user.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(user);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!UserExists(user.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(user));
        }
        public async Task <IActionResult> Edit(string id, [Bind("Category,Brand,Name,Model,Year,ProductCode,BarCode,SalePrice,DealerPrice,CostPrice,Type,Color,MinimumStockToNotify,StartingInventory,Purchased,Sold,OnHand")] ProductDetail productDetail)
        {
            if (id != productDetail.Category)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(productDetail);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ProductDetailExists(productDetail.Category))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(productDetail));
        }
示例#10
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,WarehouseId,productId,TotalAmount,DiscountPercentage,DiscountAmount,PayableTotal1,TransactionMedium,Wallets,PayingAmount,TransactionNumber,Remarks,CustomerInfo,Name,Phone,StreetAddress1,Addresses,AddressesName,ContactName,ContactPhone,StreetAddress2,District,Thana,Area,Postcode,Country,SpecialNote,SaleTotal,Discount,PayableTotal2,Paid,Due,GivenAmount,ChangeAmount,Remark,OrderReferenceNumber")] PosSale posSale)
        {
            if (id != posSale.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(posSale);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PosSaleExists(posSale.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(posSale));
        }
示例#11
0
        public async Task <IActionResult> Edit(string id, [Bind("WareHouse,ProductDetial,Quantity")] Damage damage)
        {
            if (id != damage.WareHouse)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(damage);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DamageExists(damage.WareHouse))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(damage));
        }
示例#12
0
        public async Task <IActionResult> Edit(string id, [Bind("Name,Address,Country,PhoneName,Remarks,ContactPersonName")] Supplier supplier)
        {
            if (id != supplier.Name)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(supplier);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SupplierExists(supplier.Name))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(supplier));
        }
示例#13
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Name,StreetAddress,Area,Thana,District,PostCode,Country,Phone,Remarks,CompanyName,ContactPersonName")] Dealer dealer)
        {
            if (id != dealer.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(dealer);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DealerExists(dealer.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(dealer));
        }
        public async Task <IActionResult> Edit(int id, [Bind("id,Name,Phone,Email,Salary,SaleTargetAmount,SaleAchivedAmount")] EmployeeInfo employeeInfo)
        {
            if (id != employeeInfo.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(employeeInfo);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EmployeeInfoExists(employeeInfo.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(employeeInfo));
        }
示例#15
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Name,StreetAddress,Area,District,IsMain")] Warehouse warehouse)
        {
            if (id != warehouse.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(warehouse);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!WarehouseExists(warehouse.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(warehouse));
        }
示例#16
0
        public async Task <IActionResult> Edit(string id, [Bind("WareHouse,Title,AccountNumber,BankName,WalletType,CardNumber,Balance,MobileNumber")] Wallet wallet)
        {
            if (id != wallet.WareHouse)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(wallet);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!WalletExists(wallet.WareHouse))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(wallet));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Type")] AccountHead accountHead)
        {
            if (id != accountHead.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(accountHead);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AccountHeadExists(accountHead.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(accountHead));
        }
示例#18
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,AccountHeadId,WarehouseId,WalletsId,SupplierId,PurchaseOrderDate,OrderNumber,OrderReferenceNumber,ProductAmount,OtherAmount,Discount,Total,ShippingProvider,ShippingTrackingNumber,Remarks")] Purchase purchase)
        {
            if (id != purchase.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(purchase);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PurchaseExists(purchase.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(purchase));
        }
示例#19
0
        public async Task <IActionResult> Edit(int id, [Bind("MembershipCardNo,Name,Phone,Email,NationalId,Occupation,Company,Remarks,IsActive")] Customer customer)
        {
            if (id != customer.MembershipCardNo)
            {
                return(NotFound());
            }

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