// GET: Baglantis/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Baglanti baglanti = await db.Baglantis.FindAsync(id); if (baglanti == null) { return(HttpNotFound()); } return(View(baglanti)); }
public async Task <ActionResult> Create([Bind(Include = "BaglantiId,BaglanitipId,OdfId,BaglantiAdi")] Baglanti baglanti) { if (ModelState.IsValid) { db.Baglantis.Add(baglanti); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.OdfId = new SelectList(db.Odfs, "OdfId", "OdfAdi", baglanti.OdfId); ViewBag.BaglanitipId = new SelectList(db.BaglantiTips, "BaglantiTipId", "BaglantiTipAdi"); return(View(baglanti)); }
public Makale Makaleler(int id) { using (var session = Baglanti.OpenSession()) { //Aşağıdaki Sorguların Hepsi Denendi Çalışıyor.. //var list2 = session.QueryOver<HavayoluFirmalari>().Where(x => x.AirlineName.IsLike(name, MatchMode.Anywhere)).List(); //var list3 = session.QueryOver<HavayoluFirmalari>().Where(t => t.AirlineName.IsLike("SunExpress")).List(); var list = session.QueryOver <Makale>().Where(x => x.illerID == id).SingleOrDefault(); return(list); } }
public IList <airport> ulkeKodu(string code) { using (var session = Baglanti.OpenSession()) { //Aşağıdaki Sorguların Hepsi Denendi Çalışıyor.. //var list3 = session.QueryOver<airport>().Where(t => t.AirportCode.Equals("SAW")).List(); //equals Kullanılmıyor..! //var list = session.QueryOver<airport>().Where(t => t.AirportCode.Equals(code)).List(); var list = session.QueryOver <airport>().Where(p => p.AirportCode == code || p.CityCode == code).List(); return(list); } }
// GET: Baglantis/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Baglanti baglanti = await db.Baglantis.FindAsync(id); if (baglanti == null) { return(HttpNotFound()); } ViewBag.OdfId = new SelectList(db.Odfs, "OdfId", "OdfAdi", baglanti.OdfId); ViewBag.BaglanitipId = new SelectList(db.BaglantiTips, "BaglantiTipId", "BaglantiTipAdi"); return(View(baglanti)); }
public bool Guncelle(Araclar obje) { try { string strSql = @"UPDATE Araclar SET AracMarka = '" + obje.AracMarka + "', AracModel = '" + obje.AracModel + "', AracYil = '" + obje.AracYil + "', AracGerekenEhliyetYili = '" + obje.AracGerekenEhliyetYili + "', AracGerekenMinimumYas = '" + obje.AracGerekenMinimumYas + "', AracKoltukSayisi = '" + obje.AracKoltukSayisi + "', AracGunlukFiyat = '" + obje.AracGunlukFiyat + "', AracAirbagDurumu = '" + obje.AracAirbagDurumu + "', AracBagajHacmi = '" + obje.AracBagajHacmi + "', AracGunlukKmSiniri = '" + obje.AracGunlukKmSiniri + "', FirmaId = '" + obje.FirmaId + "', KiralandiMi = '" + obje.KiralandiMi + "', AracPlakaNo = '" + obje.AracPlakaNo + "', MusteriId = '" + obje.MusteriId + "' WHERE AracId = '" + obje.AracId + "'"; Baglanti.VeriGuncelle(strSql); } catch (Exception ex) { } return(false); }
public bool Ekle(Sehirler obje) { try { Baglanti.BaglantiKontrol(); var strSql = @" INSERT INTO [dbo].[Sehirler] ([SehirAdi]) VALUES ('" + obje.SehirAdi + "');"; SqlCommand sqlCommand = new SqlCommand(strSql, Baglanti.sqlConnection); sqlCommand.ExecuteNonQuery(); return(true); } catch (Exception ex) { } return(false); }
public List <airport> customList(string sql) { using (var session = Baglanti.OpenSession()) { //var query = // session.CreateSQLQuery(sql) // .AddEntity("airport", typeof(airport)) // .List<airport>(); sql = "EXEC TR_AIRPORT_LIST '" + sql + "'"; var query = session.CreateSQLQuery(sql) .AddEntity("airport", typeof(airport)) .List <airport>(); return(query.ToList()); } }
public bool Update(Makale makale) { try { using (var session = Baglanti.OpenSession()) { session.Update(makale); // sıradan commit session.Flush(); return(true); } } catch (Exception exc) { return(false); } }
public bool Sil(int makaleId) { try { using (var session = Baglanti.OpenSession()) { var makale = session.QueryOver <Makale>().Where(x => x.illerID == makaleId).List().FirstOrDefault(); session.Delete(makale); // sıradan commit session.Flush(); return(true); } } catch (Exception exc) { return(false); } }
public List <airport> customList2(string sql) { //Procedur using (var session = Baglanti.OpenSession()) { var sql2 = "EXEC TR_AIRPORT_LIST 'IST' "; //session.CreateSQLQuery("EXEC TR_AIRPORT_LIST @StrValue = N'" + sql + "'").executeUpdate(); //.AddEntity("airport", typeof(airport)) //.List<airport>(); //return query.ToList(); var query = session.CreateSQLQuery(sql2) .AddEntity("airport", typeof(airport)) .List <airport>(); return(query.ToList()); } }
public bool Ekle(AracKmler obje) { try { Baglanti.BaglantiKontrol(); var strSql = @" INSERT INTO [dbo].[AracKmler] ([AracId] ,[AracBaslangicKm] ,[AracBitisKm] VALUES ('" + obje.AracId + "','" + obje.AracBaslangicKm + "', '" + obje.AracBitisKm + "',);"; SqlCommand sqlCommand = new SqlCommand(strSql, Baglanti.sqlConnection); sqlCommand.ExecuteNonQuery(); return(true); } catch (Exception ex) { } return(false); }
public static DataTable DataTableGetir(string SQL) { DataTable DT = new DataTable(); try { using (MySqlConnection MySQLCon = Baglanti.BaglantiCumlesi()) { using (MySqlCommand MySQLCom = new MySqlCommand(SQL, MySQLCon)) { MySQLCon.Open(); DT.Load(MySQLCom.ExecuteReader()); } } } catch { } return(DT); }
public static string ExecuteScalar(string SQL) { string sonuc = null; try { using (MySqlConnection MySQLCon = Baglanti.BaglantiCumlesi()) { using (MySqlCommand MySQLCom = new MySqlCommand(SQL, MySQLCon)) { MySQLCon.Open(); sonuc = MySQLCom.ExecuteScalar().ToString(); } } return(sonuc); } catch { } return(sonuc); }
private void dugme_baglan_Click(object sender, EventArgs e) { Baglanti.Open(); durum.Text = "Bağlantı başarıyla kuruldu!"; Kanal1 = new Thread(new ThreadStart(VeriAl)); //Kanal2 = new Thread(new ParameterizedThreadStart(worker_ComX)); //Kanal3 = new Thread(new ParameterizedThreadStart(worker_KalmanX)); //Kanal4 = new Thread(new ParameterizedThreadStart(worker_AccX)); //Kanal5 = new Thread(new ParameterizedThreadStart(worker_ComY)); //Kanal6 = new Thread(new ParameterizedThreadStart(worker_KalmanY)); //Kanal7 = new Thread(new ParameterizedThreadStart(worker_AccY)); //Kanal8 = new Thread(new ParameterizedThreadStart(worker_GyroX)); //Kanal9 = new Thread(new ParameterizedThreadStart(worker_GyroY)); //Kanal10 = new Thread(new ParameterizedThreadStart(worker_PusulaZ)); //Kanal11 = new Thread(new ParameterizedThreadStart(worker_GyroZ)); //Kanal12 = new Thread(new ParameterizedThreadStart(worker_ComZ)); //Kanal13 = new Thread(new ParameterizedThreadStart(worker_KalmanZ)); //Kanal14 = new Thread(new ParameterizedThreadStart(worker_LowPassZ)); Kanal15 = new Thread(new ParameterizedThreadStart(worker_Um7Roll)); Kanal16 = new Thread(new ParameterizedThreadStart(worker_Um7Pitch)); Kanal17 = new Thread(new ParameterizedThreadStart(worker_Um7Yaw)); Kanal1.Start(); //Kanal2.Start(new Action<myData>(this.AddDataPoint_ComX)); //Kanal3.Start(new Action<myData>(this.AddDataPoint_KalmanX)); //Kanal4.Start(new Action<myData>(this.AddDataPoint_AccX)); //Kanal5.Start(new Action<myData>(this.AddDataPoint_ComY)); //Kanal6.Start(new Action<myData>(this.AddDataPoint_KalmanY)); //Kanal7.Start(new Action<myData>(this.AddDataPoint_AccY)); //Kanal8.Start(new Action<myData>(this.AddDataPoint_GyroX)); //Kanal9.Start(new Action<myData>(this.AddDataPoint_GyroY)); //Kanal10.Start(new Action<myData>(this.AddDataPoint_PusulaZ)); //Kanal11.Start(new Action<myData>(this.AddDataPoint_GyroZ)); //Kanal12.Start(new Action<myData>(this.AddDataPoint_ComZ)); //Kanal13.Start(new Action<myData>(this.AddDataPoint_KalmanZ)); //Kanal14.Start(new Action<myData>(this.AddDataPoint_lowPassZ)); Kanal15.Start(new Action <myData>(this.AddDataPoint_Um7Roll)); Kanal16.Start(new Action <myData>(this.AddDataPoint_Um7Pitch)); Kanal17.Start(new Action <myData>(this.AddDataPoint_Um7Yaw)); }
public void SorguCalistir(string sorgu) { SorguCalistirici.CommandText = sorgu; try { Baglanti.Open(); SorguCalistirici.ExecuteNonQuery(); } catch (Exception ex) { //throw new Exception("Hata oluştu."); throw ex; } finally { if (Baglanti.State != ConnectionState.Closed || Baglanti.State != ConnectionState.Broken) { Baglanti.Close(); } } }
public bool Ekle(Kullanicilar obje) { try { Baglanti.BaglantiKontrol(); var strSql = @" INSERT INTO [dbo].[Kullanicilar] ([KullaniciAd] ,[KullaniciSoyad] ,[FirmaId] ,[KullaniciAdi] ,[KullaniciParola] ,[RolId]) VALUES ('" + obje.KullaniciAd + "','" + obje.KullaniciSoyad + "', '" + obje.FirmaId + "', '" + obje.KullaniciAdi + "', '" + obje.KullaniciParola + "','" + obje.RolId + "');"; SqlCommand sqlCommand = new SqlCommand(strSql, Baglanti.sqlConnection); sqlCommand.ExecuteNonQuery(); return(true); } catch (Exception ex) { } return(false); }
public bool Ekle(Musteriler obje) { try { Baglanti.BaglantiKontrol(); var strSql = @" INSERT INTO[dbo].[Musteriler] ([MusteriAd] ,[MusteriSoyad] ,[MusteriEhliyetNo] ,[MusteriTCKNo] ,[MusteriTelNo] ,[MusteriEmail]) VALUES ('" + obje.MusteriAd + "','" + obje.MusteriSoyad + "', '" + obje.MusteriEhliyetNo + "', '" + obje.MusteriTCKNo + "', '" + obje.MusteriTelNo + "','" + obje.MusteriEmail + "');"; SqlCommand sqlCommand = new SqlCommand(strSql, Baglanti.sqlConnection); sqlCommand.ExecuteNonQuery(); } catch (Exception ex) { } return(false); }
public static DataSet DataSetGetir(string SQL, string TabloAdi) { DataSet DS = new DataSet(); try { using (MySqlConnection MySQLCon = Baglanti.BaglantiCumlesi()) { using (MySqlCommand MySQLCom = new MySqlCommand(SQL, MySQLCon)) { using (MySqlDataAdapter MDA = new MySqlDataAdapter(SQL, MySQLCon)) { MySQLCon.Open(); MDA.Fill(DS, TabloAdi); } } } } catch { } return(DS); }
private void VeriAl() { yazi = Baglanti.ReadLine(); Metin_Girisi2(yazi, richTextBox1); //if (yazi.IndexOf("Pol")==0) //{ // yazi = yazi.Replace('.', ','); // indis_um7Roll = yazi.IndexOf("R:"); // indis_um7Pitch = yazi.IndexOf("P:"); // indis_um7Yaw = yazi.IndexOf("Y:"); // um7Roll = Convert.ToDouble(yazi.Substring(indis_um7Roll + 2, indis_um7Pitch - indis_um7Roll - 2).Trim()); // um7Pitch = Convert.ToDouble(yazi.Substring(indis_um7Pitch + 2, indis_um7Yaw - indis_um7Pitch - 2).Trim()); // um7Yaw = Convert.ToDouble(yazi.Substring(indis_um7Yaw + 2, yazi.Length - indis_um7Yaw - 2 - 1).Trim()); //} //if (yazi[0] == 'R') //{ //} //if (yazi[0] == 'X') //{ // Metin_Girisi("", gelenKutusu); // Metin_Girisi(yazi.ToString(), gelenKutusu); // yazi = yazi.Replace('.', ','); // indis_accX = yazi.IndexOf("X0:"); // indis_accY = yazi.IndexOf("Y0:"); // indis_gyroX = yazi.IndexOf("X1:"); // indis_gyroY = yazi.IndexOf("Y1:"); // indis_comX = yazi.IndexOf("X2:"); // indis_comY = yazi.IndexOf("Y2:"); // indis_kalmanX = yazi.IndexOf("X3:"); // indis_kalmanY = yazi.IndexOf("Y3:"); // indis_pusulaZ = yazi.IndexOf("Z0:"); // indis_gyroZ = yazi.IndexOf("Z1:"); // indis_comZ = yazi.IndexOf("Z2:"); // indis_kalmanZ = yazi.IndexOf("Z3:"); // indis_LowPassZ = yazi.IndexOf("Z4:"); // //accX = Convert.ToDouble(yazi.Substring(indis_accX + 3, indis_accY - indis_accX - 3).Trim()); // //accY = Convert.ToDouble(yazi.Substring(indis_accY + 3, indis_gyroX - indis_accY - 3).Trim()); // //gyroX = Convert.ToDouble(yazi.Substring(indis_gyroX + 3, indis_gyroY - indis_gyroX - 3).Trim()); // //gyroY = Convert.ToDouble(yazi.Substring(indis_gyroY + 3, indis_comX - indis_gyroY - 3).Trim()); // //comX = Convert.ToDouble(yazi.Substring(indis_comX + 3, indis_comY - indis_comX - 3).Trim()); // //comY = Convert.ToDouble(yazi.Substring(indis_comY + 3, indis_kalmanX - indis_comY - 3).Trim()); // //kalmanX = Convert.ToDouble(yazi.Substring(indis_kalmanX + 3, indis_kalmanY - indis_kalmanX - 3).Trim()); // //kalmanY = Convert.ToDouble(yazi.Substring(indis_kalmanY + 3, indis_pusulaZ - indis_kalmanY - 3).Trim()); // //pusulaZ = Convert.ToDouble(yazi.Substring(indis_pusulaZ + 3, indis_gyroZ - indis_pusulaZ - 3).Trim()); // //gyroZ = Convert.ToDouble(yazi.Substring(indis_gyroZ + 3, indis_comZ - indis_gyroZ - 3).Trim()); // //comZ = Convert.ToDouble(yazi.Substring(indis_comZ + 3, indis_kalmanZ - indis_comZ - 3).Trim()); // //kalmanZ = Convert.ToDouble(yazi.Substring(indis_kalmanZ + 3, indis_LowPassZ - indis_kalmanZ - 3).Trim()); // //lowPassZ = Convert.ToDouble(yazi.Substring(indis_LowPassZ + 3, yazi.Length - indis_LowPassZ - 3 - 1).Trim()); // Metin_Girisi(accX.ToString(), metin_accX); // Metin_Girisi(accY.ToString(), metin_accY); // Metin_Girisi(pusulaZ.ToString(), metin_pusulaZ); // Metin_Girisi(gyroX.ToString(), metin_gyroX); // Metin_Girisi(gyroY.ToString(), metin_gyroY); // Metin_Girisi(gyroZ.ToString(), metin_gyroZ); // Metin_Girisi(comX.ToString(), metin_comX); // Metin_Girisi(comY.ToString(), metin_comY); // Metin_Girisi(comZ.ToString(), metin_comZ); // Metin_Girisi(kalmanX.ToString(), metin_kalmanX); // Metin_Girisi(kalmanY.ToString(), metin_kalmanY); // Metin_Girisi(kalmanZ.ToString(), metin_kalmanZ); // render(); //} }
public static string UrunEkle(string Baslik, string Etiket, string Description) { Baglanti.ExecuteQuery("insert into Tbl_Genel_Kayitlar (Baslik,Etiket,Description) values ('" + Baslik + "','" + Etiket + "','" + Description + "')"); return("success"); }
public HtmlBelgesi(Baglanti baglanti) { _baglanti = baglanti; }
public static string UrunDuzenle(int id, string Baslik, string Etiket, string Description) { DataRow dr = Baglanti.GetDataRow("update Tbl_Genel_Kayitlar set Baslik='" + Baslik + "',etiket='" + Etiket + "',Description='" + Description + "' where id=" + id + ""); return("success"); }
public void LoadData() { chartControl1.DataSource = Baglanti.GetData(dateTimePicker1.Value.ToString("yyyyMMdd")); chartControl1.SeriesDataMember = "OrtalamaKm"; chartControl1.SeriesDataMember = "OrtalamaGun"; }
private void BaglantiKontroluYap() { Baglanti baglanti = new Baglanti(); baglanti.InternetVarMi(); }
public KitaplarDAL() { baglanti = new Baglanti(); }
public static string UrunList() { DataTable dtUrunler = Baglanti.GetDataTable("select*from Tbl_Genel_Kayitlar order by id desc"); return(JsonConvert.SerializeObject(dtUrunler)); }