public ActionResult Index()
        {
            CustomerDetailBLL     objCustomerBLL = new CustomerDetailBLL();
            List <CustomerDetail> customerList   = objCustomerBLL.GetAllCustomerInfo();

            return(View(customerList));
        }
        public ActionResult Delete(int id)
        {
            CustomerDetailBLL objCustomerBLL = new CustomerDetailBLL();
            var customerInfo = objCustomerBLL.GetCustomerInfo(id);

            ViewBag.CountryInfo = objCustomerBLL.GetCountryName();
            return(View(customerInfo));
        }
 public ActionResult DeleteCustomerInfo(int id)
 {
     if (ModelState.IsValid)
     {
         CustomerDetailBLL objCustomerBLL = new CustomerDetailBLL();
         objCustomerBLL.DeleteCustomerInfo(id);
     }
     return(RedirectToAction("Index", "CustomerDetail"));
 }
        public ActionResult Edit(CustomerDetail objCustomerInfo)
        {
            if (ModelState.IsValid)
            {
                CustomerDetailBLL objCustomerBLL = new CustomerDetailBLL();

                objCustomerBLL.UpdateCustomerInfo(objCustomerInfo);
            }
            return(RedirectToAction("Index", "CustomerDetail"));
        }
        public ActionResult Save()
        {
            CustomerDetailBLL objCustomerBLL = new CustomerDetailBLL();
            var model = new CustomerDetail
            {
                CountryInfo = objCustomerBLL.GetCountryName()
            };

            return(View(model));
        }
        public ActionResult Save(CustomerDetail objCustomerInfo)
        {
            objCustomerInfo.CountryId = Convert.ToInt16(Request.Form["CountryId"]);

            if (ModelState.IsValid)
            {
                CustomerDetailBLL objCustomerBLL = new CustomerDetailBLL();

                objCustomerBLL.SaveCustomerInfo(objCustomerInfo);
            }

            return(RedirectToAction("Index", "CustomerDetail"));
        }
        public ActionResult Index()
        {
            SupplierBLL     objSupplierBLL = new SupplierBLL();
            List <Supplier> SupplierList   = objSupplierBLL.GetAllSupplier();

            ViewBag.supplierList = SupplierList;
            ProductBLL     objProductBll = new ProductBLL();
            List <Product> ProductList   = objProductBll.GetAllProduct();

            ViewBag.productList = ProductList;
            CustomerDetailBLL objCustomerBLL = new CustomerDetailBLL();

            ViewBag.customerList = objCustomerBLL.GetAllCustomerInfo();
            CountryBLL objCountryBLL = new CountryBLL();

            ViewBag.countryList = objCountryBLL.GetAllCountry();

            return(View());
        }