Example #1
0
 // GET: api/Sirket
 public IHttpActionResult Get()
 {
     using (var SirketBusiness = new SirketBusiness())
     {
         List <Sirket> sirlist = SirketBusiness.SelectAllSirket();
         var           content = new ResponseContent <Sirket>(sirlist);
         return(new StandartResults <Sirket>(content, Request));
     }
 }
Example #2
0
 public Sirket[] SelectAllSirket()
 {
     try
     {
         using (var business = new SirketBusiness())
         {
             return(business.SelectAllSirket().ToArray());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
 private List <Sirket> ListAllSirket()
 {
     try
     {
         using (var SirketBussines = new SirketBusiness())
         {
             List <Sirket> Sirket = SirketBussines.SelectAllSirket();
             return(Sirket);
         }
     }
     catch (Exception ex)
     {
         LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true);
         throw new Exception("Sirket doesn't exists.");
     }
 }
Example #4
0
        void sirketListele()
        {
            try
            {
                using (var sirketBusiness = new SirketBusiness())
                {
                    List <Sirket> sirketList = sirketBusiness.SelectAllSirket().ToList();
                    dgSirketListe.DataSource = sirketList;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error happened: " + ex.Message);
            }

            dgSirketListe.ClearSelection();
        }