コード例 #1
0
ファイル: Eslestirme.cs プロジェクト: Gulfem93/Game-Unity-
    void Start()
    {
        kamera              = GameObject.Find("Camera").GetComponent <Camera>();
        golgeler            = GameObject.FindGameObjectsWithTag("zemin");
        baslangic_posizyonu = transform.position;

        yonet = GameObject.Find("Yonetici").GetComponent <Yonetici>();
    }
コード例 #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            Yonetici kitap = db.kitap.Find(id);

            db.kitap.Remove(kitap);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #3
0
        public ActionResult DeleteConfirmed(int id)
        {
            Yonetici yonetici = db.Yonetici.Find(id);

            db.Yonetici.Remove(yonetici);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #4
0
        // GET: Yonetici
        public ActionResult Index(int YoneticiNo)
        {
            Yonetici tempYonetici = new Yonetici();

            tempYonetici = Db.Yoneticiler.SingleOrDefault(I => I.YoneticiNo == YoneticiNo);

            return(View());
        }
コード例 #5
0
        public ActionResult DeleteConfirmed(string id)
        {
            Yonetici yonetici = yoneticiConcrete._yoneticiRepository.GetById(id);

            yoneticiConcrete._yoneticiRepository.Delete(yonetici);
            yoneticiConcrete._yoneticiUnitOfWork.SaveChanges();
            yoneticiConcrete._yoneticiUnitOfWork.Dispose();
            return(RedirectToAction("Index"));
        }
コード例 #6
0
    public void delete(int yoneticiID)
    {
        Yonetici yonetici = context.yoneticis.FirstOrDefault(
            x => x.adminID == yoneticiID
            );

        context.yoneticis.Remove(yonetici);
        context.SaveChanges();
    }
コード例 #7
0
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            Yonetici y = new Yonetici();

            y.YoneticiAdi    = textBox1.Text;
            y.YoneticiUnvani = textBox2.Text;
            yr.Insert(y);
            Getir();
        }
コード例 #8
0
        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (ben == null)
            {
                ben = Session["yonetici"] as Yonetici;
            }

            base.OnActionExecuting(filterContext);
        }
コード例 #9
0
 // 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());
 }
コード例 #10
0
 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();
 }
コード例 #11
0
        [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));
        }
コード例 #12
0
 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));
 }
コード例 #13
0
 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);
     }
 }
コード例 #14
0
 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));
 }
コード例 #15
0
        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));
        }
コード例 #16
0
        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;
            }
        }
コード例 #17
0
        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));
        }
コード例 #18
0
 public ActionResult YoneticiDetay(int?id)
 {
     if (id > 0)
     {
         Yonetici yonetici = db.Yoneticis.Find(id);
         if (yonetici != null)
         {
             return(View(yonetici));
         }
     }
     return(RedirectToAction("Yoneticiler"));
 }
コード例 #19
0
        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"));
        }
コード例 #20
0
 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.");
     }
 }
コード例 #21
0
        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"));
        }
コード例 #22
0
        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"));
        }
コード例 #23
0
        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);
        }
コード例 #24
0
        // 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));
        }
コード例 #25
0
        // 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));
        }
コード例 #26
0
        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);
        }
コード例 #27
0
        // 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));
        }
コード例 #28
0
    public IActionResult Login(Yonetici yonetici)
    {
        Yonetici y =
            _yoneticiRepository.loginn(yonetici.username, yonetici.password);

        if (y != null)
        {
            return(RedirectToAction("List"));
        }
        else
        {
            return(View());
        }
    }
コード例 #29
0
        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"));
        }
コード例 #30
0
 public bool YoneticiGuncelle(Yonetici entity)
 {
     try
     {
         using (var business = new YoneticiBusiness())
         {
             business.YoneticiGuncelle(entity);
         }
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }