// GET: Admin/Country
        public ActionResult Index()
        {
            CountryBLL     objCountryBLL = new CountryBLL();
            List <Country> CountryList   = objCountryBLL.GetAllCountry();

            return(View(CountryList));
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (Request.QueryString["id"] == null)
                    {
                        Response.Redirect("EmpList.aspx", false);
                    }
                    else
                    {
                        // loading countries
                        ddlCountries.DataSource = CountryBLL.GetAllCountry();
                        ddlCountries.DataBind();

                        Employee emp = EmployeeBLL.GetEmployee(Convert.ToInt32(Request.QueryString["id"]));
                        txtEmpID.Value             = emp.EmpID.ToString();
                        txtFirstName.Value         = emp.FirstName;
                        txtLastName.Value          = emp.LastName;
                        txtAge.Value               = emp.Age.ToString();
                        ddlCountries.SelectedValue = emp.CountryID.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                lbMsg.Text = "error";
                AppLogger.WriteLog(ex.ToString());
            }
        }
        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());
        }