Beispiel #1
0
        // GET api/<controller>
        public IHttpActionResult Get()
        {
            using (var kiralikBusiness = new KiralikBusiness())
            {
                List <Kiralik> kiralikList = kiralikBusiness.SelectAllKiralik();

                var content = new ResponseContent <Kiralik>(kiralikList);
                return(new StandartResult <Kiralik>(content, Request));
            }
        }
Beispiel #2
0
        void kiralananListele()
        {
            try
            {
                using (var kiralikBusiness = new KiralikBusiness())
                {
                    List <Kiralik> kiraList = kiralikBusiness.SelectAllKiralik().ToList();
                    dgKiralananAraclar.DataSource = kiraList;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error happened: " + ex.Message);
            }

            dgKiralananAraclar.ClearSelection();
        }