public async Task <IActionResult> Index(int id, [Bind("Id,firmafirmaekle,firmafirmasil,firmafirmaguncel,firmabirimekle,firmabirimsil,firmabirimguncel," +
                                                              "firmapersonelekle,firmapersonelsil,firmapersonelguncel,firmailacekle,firmailaccsil,firmataniekle,firmatanisil,firmastatuekle,firmastatusil," +
                                                              "hekimfirmaekle,hekimfirmasil,hekimfirmaguncel,hekimbirimekle,hekimbirimsil,hekimbirimguncel,hekimpersonelekle,hekimpersonelsil,hekimpersonelguncel," +
                                                              "hekimilacekle,hekimilacsil,hekimtaniekle,hekimtanisil,hekimstatuekle,hekimstatusil," +
                                                              "uzmanfirmaekle,uzmanfirmasil,uzmanfirmaguncel,uzmanbirimekle,uzmanbirimsil,uzmanbirimguncel,uzmanpersonelekle,uzmanpersonelsil,uzmanpersonelguncel," +
                                                              "uzmanilacekle,uzmanilacsil,uzmantaniekle,uzmantanisil,uzmanstatuekle,uzmanstatusil")] YetkiKontrol yetki)
        {
            if (id != yetki.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(yetki);
                    await _context.SaveChangesAsync();

                    return(RedirectToAction(nameof(Index)));
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!yetkiExists(yetki.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
            }
            return(View(yetki));
        }
Exemple #2
0
        public async Task <IActionResult> Edit(int id, [Bind("Rid,Mid,Rtarihi,Rtipi,Ralttipi,Provizyontipi,Serino")] Recete res)
        {
            if (id != res.Rid)
            {
                return(NotFound());
            }
            if (ModelState.IsValid)
            {
                try{ _context.Update(res);
                     await _context.SaveChangesAsync();

                     return(RedirectToAction("Details", "Muayene", new { id = res.Mid })); }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ReceteExists(res.Rid))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
            }
            return(View(res));
        }
Exemple #3
0
        public async Task <IActionResult> Edit(int id, [Bind("Rilacid,Rid,Ilacid, Kullanimadedi,Kullanimsekli,Periyod,Ilacdozu")] Receteilac ri)
        {
            if (id != ri.Rilacid)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(ri);
                    await _context.SaveChangesAsync();

                    return(RedirectToAction("Index", "ReceteIlac", new { id = ri.Rid }));
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!RilacExists(ri.Rilacid))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
            }

            return(View(ri));
        }
Exemple #4
0
        public async Task <IActionResult> SifreYenile(int id, [Bind("Id,Sifre,SifreTekrar")] Register res)
        {
            if (ModelState.IsValid)
            {
                if (res.Sifre != res.SifreTekrar)
                {
                    ViewBag.sonuc = "SİFRE VE SİFRE TEKRARI AYNI DEĞİL.";
                }

                else
                {
                    var user = _context.Users.FirstOrDefault(z => z.Id == id);
                    user.Sifre = res.Sifre;
                    _context.Update(user);
                    await _context.SaveChangesAsync();

                    return(RedirectToAction("ISGM", "Home"));
                }
            }
            return(View(res));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Sicilnop,Ad,Soyad,Unvan,Ogrenimdurum,Cinsiyet,Boy,Kilo,Isegiristrh,Dogumtarih,Dogumyer,Firmaid")] Personel pers)
        {
            if (id != pers.Sicilnop)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(pers);
                    await _context.SaveChangesAsync();

                    if (HttpContext.Session.GetString("grubu") == "A")
                    {
                        return(RedirectToAction(nameof(Gruppersonel)));
                    }
                    else if (HttpContext.Session.GetString("grubu") == "B")
                    {
                        return(RedirectToAction(nameof(Firmapersonel)));
                    }
                    else if (HttpContext.Session.GetString("grubu") == "C")
                    {
                        return(RedirectToAction(nameof(kullaniciFirmapersonel)));
                    }
                    else if (HttpContext.Session.GetString("grubu") == "D")
                    {
                        return(RedirectToAction(nameof(kullaniciFirmapersonel)));
                    }
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PersonelExists(pers.Sicilnop))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
            }
            ViewData["Firmaid"] = new SelectList(_context.Firma, "Firmaid", "Firmaid", pers.Firmaid);
            return(View(pers));
        }
Exemple #6
0
        public async Task <IActionResult> Edit(int id, [Bind("Birimid,Birimad,Adres,Tehlikesinif,Aciklama,Firmaid,Sicilnop")] Birim birs)
        {
            if (id != birs.Birimid)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(birs);
                    await _context.SaveChangesAsync();

                    if (HttpContext.Session.GetString("grubu") == "A")
                    {
                        return(RedirectToAction(nameof(Grupbirim)));
                    }
                    else if (HttpContext.Session.GetString("grubu") == "B")
                    {
                        return(RedirectToAction(nameof(Firmabirim)));
                    }
                    else if (HttpContext.Session.GetString("grubu") == "C")
                    {
                        return(RedirectToAction(nameof(kullaniciFirmabirim)));
                    }
                    else if (HttpContext.Session.GetString("grubu") == "D")
                    {
                        return(RedirectToAction(nameof(kullaniciFirmabirim)));
                    }
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BirimExists(birs.Birimid))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
            }
            ViewData["Firmaid"] = new SelectList(_context.Firma, "Firmaid", "Firmaid", birs.Firmaid);
            return(View(birs));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Mid,Mneden,Mtarihi,Sonrakimtarih,Annehastalikg,Babahastalikg,Kardeshastalikg,Cocukhastalikg,Büyüktan,Kücüktan,Nabiz,Kilo,Boy,Kangrup,Sicilno,Sicilnop")]
                                               Muayene mu)
        {
            if (id != mu.Mid)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(mu);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MuayeneExists(mu.Mid))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                if (HttpContext.Session.GetString("grubu") == "A")
                {
                    return(RedirectToAction(nameof(Grupmuayene)));
                }
                else if (HttpContext.Session.GetString("grubu") == "C")
                {
                    return(RedirectToAction(nameof(kullaniciFirmamuayene)));
                }
            }

            return(View(mu));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Egitimid,Egitimtrh,Egitimalani,Toplamsure,Aciklama,Egitimkonulari,Sicilno")]
                                               Egitimler eg)
        {
            if (id != eg.Egitimid)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(eg);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EgitimExists(eg.Egitimid))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                if (HttpContext.Session.GetString("grubu") == "A")
                {
                    return(RedirectToAction(nameof(Grupegitim)));
                }
                else if (HttpContext.Session.GetString("grubu") == "D")
                {
                    return(RedirectToAction(nameof(kulFirmaegitim)));
                }
            }

            return(View(eg));
        }