public IActionResult OnPost()
        {
            if (ModelState.IsValid)
            {
                Controller.ABCPOS ABCHardware = new Controller.ABCPOS();

                ABCCustomer = ABCHardware.FindCustomer(CustomerName);

                foundcustomer = ABCCustomer.CustomerName != null ? true : false;
            }
            return(Page());
        }
        public IActionResult OnPost()
        {
            if (ModelState.IsValid)
            {
                Controller.ABCPOS ABCHardware = new Controller.ABCPOS();

                inventoryItem = ABCHardware.FindItem(ItemCode);

                foundItem = inventoryItem.ItemCode != null ? true : false;
            }
            return(Page());
        }
        public ActionResult OnPost()
        {
            if (ModelState.IsValid)
            {
                InventoryItem.ItemCode    = Itemcode;
                InventoryItem.Description = Description;
                InventoryItem.UnitPrice   = Unitprice;
                InventoryItem.QtyOH       = QtyOH;

                Controller.ABCPOS ABCHardware = new Controller.ABCPOS();

                Confirmation = ABCHardware.CreateItem(InventoryItem);

                if (Confirmation)
                {
                    Alert = $"Item Added Successfully";

                    return(RedirectToPage("AddItem"));
                }
            }
            return(Page());
        }
Beispiel #4
0
        public ActionResult OnPost()
        {
            if (ModelState.IsValid)
            {
                newCustomer.CustomerName = CustomerName;
                newCustomer.Address      = Address;
                newCustomer.City         = City;
                newCustomer.Province     = Province;
                newCustomer.PostalCode   = PostalCode;

                Controller.ABCPOS ABCHardware = new Controller.ABCPOS();

                Confirmation = ABCHardware.CreateCustomer(newCustomer);

                if (Confirmation)
                {
                    Alert = $"Customer Added Successfully";

                    return(RedirectToPage("AddCustomer"));
                }
            }
            return(Page());
        }