void Start() { kamera = GameObject.Find("Camera").GetComponent <Camera>(); golgeler = GameObject.FindGameObjectsWithTag("zemin"); baslangic_posizyonu = transform.position; yonet = GameObject.Find("Yonetici").GetComponent <Yonetici>(); }
public ActionResult DeleteConfirmed(int id) { Yonetici kitap = db.kitap.Find(id); db.kitap.Remove(kitap); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { Yonetici yonetici = db.Yonetici.Find(id); db.Yonetici.Remove(yonetici); db.SaveChanges(); return(RedirectToAction("Index")); }
// GET: Yonetici public ActionResult Index(int YoneticiNo) { Yonetici tempYonetici = new Yonetici(); tempYonetici = Db.Yoneticiler.SingleOrDefault(I => I.YoneticiNo == YoneticiNo); return(View()); }
public ActionResult DeleteConfirmed(string id) { Yonetici yonetici = yoneticiConcrete._yoneticiRepository.GetById(id); yoneticiConcrete._yoneticiRepository.Delete(yonetici); yoneticiConcrete._yoneticiUnitOfWork.SaveChanges(); yoneticiConcrete._yoneticiUnitOfWork.Dispose(); return(RedirectToAction("Index")); }
public void delete(int yoneticiID) { Yonetici yonetici = context.yoneticis.FirstOrDefault( x => x.adminID == yoneticiID ); context.yoneticis.Remove(yonetici); context.SaveChanges(); }
private void btnKaydet_Click(object sender, EventArgs e) { Yonetici y = new Yonetici(); y.YoneticiAdi = textBox1.Text; y.YoneticiUnvani = textBox2.Text; yr.Insert(y); Getir(); }
protected override void OnActionExecuting(ActionExecutingContext filterContext) { if (ben == null) { ben = Session["yonetici"] as Yonetici; } base.OnActionExecuting(filterContext); }
// POST: api/Arac public IHttpActionResult Post([FromBody] Yonetici Yonetici) { if (ModelState.IsValid) { var olusturulanYonetici = YoneticiBusiness.YoneticiEkle(Yonetici); return(CreatedAtRoute("DefaultApi", new { id = olusturulanYonetici.YoneticiID }, olusturulanYonetici)); } return(BadRequest()); }
private void FormYonetici_Load(object sender, EventArgs e) { yonetici = new YoneticiRepo().IDYiGetir(FormSeferTasiGiris.yonetici.YoneticiId); this.Text = FormSeferTasiGiris.kullanici.KullaniciAdi; firmalariGetir(); profilimiDoldur(); cmbFirmalar.DataSource = new FirmaRepo().HepsiniGetir().Where(x => x.FirmaAktifMi == true).ToList(); cmbFirmalar.DisplayMember = "FirmaAdi"; //ChartDoldur(); }
[ValidateAntiForgeryToken] // sahte bir sayfadan gelmediğine emin olmak için kullanılır.Güvenlik önlemi public ActionResult Edit([Bind(Include = "ID,kitap_adi,yazar_adi,tur,basim_tarihi,fiyat")] Yonetici kitap) { if (ModelState.IsValid) { db.Entry(kitap).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(kitap)); }
public ActionResult Edit([Bind(Include = "YoneticiID,UserName,Mail,Password")] Yonetici yonetici) { if (ModelState.IsValid) { db.Entry(yonetici).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(yonetici)); }
public static Yonetici UpdateKullanici(Yonetici k) { using (YurtDbEntities db = new YurtDbEntities()) { db.Entry(k).State = EntityState.Modified; db.Yonetici.Add(k); db.SaveChanges(); return(k); } }
public ActionResult Edit([Bind(Include = "YoneticiID,TC,Ad,Soyad,KullaniciAdi,Sifre")] Yonetici yonetici) { if (ModelState.IsValid) { yoneticiConcrete._yoneticiRepository.Update(yonetici); yoneticiConcrete._yoneticiUnitOfWork.SaveChanges(); yoneticiConcrete._yoneticiUnitOfWork.Dispose(); return(RedirectToAction("Index")); } return(View(yonetici)); }
public ActionResult Create([Bind(Include = "ID,kitap_adi,yazar_adi,tur,basim_tarihi,fiyat")] Yonetici kitap) { if (ModelState.IsValid) { db.kitap.Add(kitap); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(kitap)); }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView1.SelectedRows.Count > 0) { int ID = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells[0].Value); guncelle = yr.SelectById(ID); textBox1.Text = guncelle.YoneticiAdi; textBox2.Text = guncelle.YoneticiUnvani; } }
public JsonResult SifreDegistir(Yonetici y) { Yonetici yönetici = db.Yoneticis.FirstOrDefault(x => x.Email == User.Identity.Name); yönetici.Sifre = y.Sifre; db.SaveChanges(); //return RedirectToAction("Index"); return(Json("başarılı", JsonRequestBehavior.AllowGet)); }
public ActionResult YoneticiDetay(int?id) { if (id > 0) { Yonetici yonetici = db.Yoneticis.Find(id); if (yonetici != null) { return(View(yonetici)); } } return(RedirectToAction("Yoneticiler")); }
public ActionResult KategoriEkle(Kategori kat, HttpPostedFileBase Resimk)// HttpPostedFileBase Resim { Yonetici katSahip = Session["Yonetici"] as Yonetici; //katSahip.KullaniciID = katSahip.KullaniciID; //var KatEkId = katSahip.KullaniciID; kat.KategoriResim = ResimKaydet(Resimk, HttpContext); db.Kategori.Add(kat); db.SaveChanges(); return(RedirectToAction("Kategoriler")); }
private void yGiris_Click(object sender, EventArgs e) { if (baglanti.yBaglan(yNo.Text, ySifre.Text) == true) { Yonetici frmYonetici = new Yonetici(yNo.Text); frmYonetici.Show(); this.Hide(); } else { MessageBox.Show("Giriş başarısız. Lütfen tekrar deneyin."); } }
public ActionResult SifremiUnuttum(Yonetici y) { Yonetici yo = db.Yoneticis.FirstOrDefault(x => x.Email == y.Email); if (yo.GizliSoru == y.GizliSoru && yo.GizliCevap == y.GizliCevap) { yo.Sifre = y.Sifre; db.SaveChanges(); return(RedirectToAction("Index")); } return(RedirectToAction("Index")); }
public ActionResult YoneticiKayit(Yonetici model) { db.Yonetici.Add(model); db.SaveChanges(); if (Session["YoneticiName"] == null) { var yonetici = db.Yonetici.FirstOrDefault(x => x.UserName == model.UserName); Session["YoneticiName"] = yonetici.YoneticiID; Session["UserName"] = null; } return(RedirectToAction("Listele", "Urunler")); }
public async Task <Yonetici> Register(Yonetici yonetici, string sifre) { byte[] sifreHash, sifreSalt; CreatePasswordHash(sifre, out sifreHash, out sifreSalt); yonetici.SifreHash = sifreHash; yonetici.SifreSalt = sifreSalt; await _context.Yonetici.AddAsync(yonetici); await _context.SaveChangesAsync(); return(yonetici); }
// GET: Yonetici/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Yonetici yonetici = yoneticiConcrete._yoneticiRepository.GetById(id); if (yonetici == null) { return(HttpNotFound()); } return(View(yonetici)); }
// GET: Yonetici/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Yonetici yonetici = db.Yonetici.Find(id); if (yonetici == null) { return(HttpNotFound()); } return(View(yonetici)); }
public Yonetici yoneticiAra(int key) { baglan(); komut.CommandText = "select * from AdminLogin where adminId=@key"; komut.Parameters.AddWithValue("@key", key); dr = komut.ExecuteReader(); dr.Read(); Yonetici y = new Yonetici(); y.ad = dr["adminName"].ToString(); y.sifre = dr["adminPassword"].ToString(); conn.Close(); return(y); }
// GET: Movies/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Yonetici kitap = db.kitap.Find(id); if (kitap == null) { return(HttpNotFound()); } return(View(kitap)); }
public IActionResult Login(Yonetici yonetici) { Yonetici y = _yoneticiRepository.loginn(yonetici.username, yonetici.password); if (y != null) { return(RedirectToAction("List")); } else { return(View()); } }
public ActionResult YoneticiGuncelle(FormCollection frm) { yoneticiConcrete = new YoneticiConcrete(); Yonetici yonetici = yoneticiConcrete._yoneticiRepository.GetById(Convert.ToInt32(frm["YoneticiID"])); yonetici.KullaniciAdi = frm["KullaniciAdi"]; yonetici.Sifre = frm["Sifre"]; yonetici.AktifMi = true; yoneticiConcrete._yoneticiUnitOfWork.SaveChanges(); yoneticiConcrete._yoneticiUnitOfWork.Dispose(); Session["KullaniciAdi"] = null; return(RedirectToAction("Giris", "Yonetici")); }
public bool YoneticiGuncelle(Yonetici entity) { try { using (var business = new YoneticiBusiness()) { business.YoneticiGuncelle(entity); } return(true); } catch (Exception) { return(false); } }