Esempio n. 1
0
        public IActionResult CustomersList()
        {
            DataTable data = new DataTable();

            data = new GetCustomersBAL().CustomersList();
            IList <Customer> list = new List <Customer>();

            foreach (DataRow row in data.Rows)
            {
                list.Add(new Customer()
                {
                    CustomerId      = int.Parse(row["CustomerId"].ToString()),
                    CustomerName    = row["CustomerName"].ToString(),
                    CustomerAddress = row["CustomerAddress"].ToString()
                });
            }
            return(View(list));
        }
Esempio n. 2
0
        public IActionResult Question4()
        {
            DataTable data = new DataTable();

            data = new GetCustomersBAL().Question4();
            IList <CustomerBanks> list = new List <CustomerBanks>();

            foreach (DataRow row in data.Rows)
            {
                list.Add(new CustomerBanks()
                {
                    CustomerId   = int.Parse(row["CustomerId"].ToString()),
                    CustomerName = row["CustomerName"].ToString(),
                    BankName     = row["BankName"].ToString(),
                    TagId        = int.Parse(row["TagId"].ToString())
                });
            }
            return(View(list));
        }