public async Task <IActionResult> FirmaKayit([Bind("Firmaid,soru,cevap,renk,Sifre,SifreTekrar,Kullaniciadi")] Register res) { if (ModelState.IsValid) { if (res.Sifre != res.SifreTekrar) { ViewBag.sonuc = "SİFRE VE SİFRE TEKRARI AYNI DEĞİL."; } else if (_context.Users.FirstOrDefault(z => z.Kullaniciadi == res.Kullaniciadi) == null) { var user = new Users(); user.Firmaid = res.Firmaid; user.soru = res.soru; user.cevap = res.cevap; user.renk = res.renk; user.Sifre = res.Sifre; user.Kullaniciadi = res.Kullaniciadi; user.Grubu = "B"; _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction("ISGM", "Home")); } else { ViewBag.sonuc = "BÖYLE BİR KULLANICI ADI ZATEN VAR"; } } return(View(res)); }
public async Task <IActionResult> Create([Bind("Birimad,Adres,Tehlikesinif,Aciklama,Firmaid,Sicilnop")] Birim bir) { if (ModelState.IsValid) { _context.Add(bir); 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))); } } return(View(bir)); }
public async Task <IActionResult> Create([Bind("Funvan,Isvrnadsoyad,Isvrngsm,Firmatlfn,Faks,Firmamail,Il,Ilce,Adres,Faaliyetalan,Sgksicil,Tehlikesinif,Grupsirket")] Firma fir) { if (ModelState.IsValid) { baglantiSinifi bs = new baglantiSinifi(); string sorgu = "insert into firmagruplari(grup_ad) values('" + fir.Funvan + "')"; bs.baglanti("ekleme", sorgu); int a = bs.baglanti("bulgrubu", ""); string sorgu1 = "insert into firma(funvan,isvrnadsoyad,isvrngsm,firmatlfn,faks,firmamail,il,ilce,adres,faaliyetalan,sgksicil,tehlikesinif,grupsirket,durum,grup_id) values" + "('" + fir.Funvan + "','" + fir.Isvrnadsoyad + "','" + fir.Isvrngsm + "','" + fir.Firmatlfn + "','" + fir.Faks + "','" + fir.Firmamail + "','" + fir.Il + "','" + fir.Ilce + "','" + fir.Adres + "','" + fir.Faaliyetalan + "','" + fir.Sgksicil + "','" + fir.Tehlikesinif + "','" + fir.Grupsirket + "','ANA FİRMA','" + a + "')"; bs.baglanti("ekleme", sorgu1); a = bs.baglanti("bulfirma", ""); var user = new Users { Kullaniciadi = fir.Firmamail, Sifre = "sıfırIsgm", Firmaid = a, Grubu = "B" }; _context.Add(user); await _context.SaveChangesAsync(); ViewBag.sonuc = "FİRMA Eklendi"; return(RedirectToAction(nameof(Index))); } return(View(fir)); }
public async Task <IActionResult> Create([Bind("Ilacadi")] Ilactanimi ilac) { if (ModelState.IsValid) { _context.Add(ilac); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(ilac)); }
public async Task <IActionResult> Create([Bind("Statuadi")] Statu statu) { if (ModelState.IsValid) { _context.Add(statu); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(statu)); }
public async Task <IActionResult> Create([Bind("Mid,Tanimid")] Tanilar tan) { if (ModelState.IsValid) { _context.Add(tan); await _context.SaveChangesAsync(); return(RedirectToAction("Index", "Tanilar", new { id = tan.Mid })); } return(View(tan)); }
public async Task <IActionResult> Create([Bind("Mid,Rtarihi,Rtipi,Ralttipi,Provizyontipi,Serino")] Recete rec) { if (ModelState.IsValid) { _context.Add(rec); await _context.SaveChangesAsync(); return(RedirectToAction("Details", "Muayene", new { id = rec.Mid })); } return(View(rec)); }
public async Task <IActionResult> Create([Bind("Egitimid,Sicilnop,Basariyuzdesi")] Katilimcilar kat) { if (ModelState.IsValid) { _context.Add(kat); await _context.SaveChangesAsync(); return(RedirectToAction("Index", "Katilimcilar", new { id = kat.Egitimid })); } return(View(kat)); }
public async Task <IActionResult> Create([Bind("Rid,Ilacid, Kullanimadedi,Kullanimsekli,Periyod,Ilacdozu")] Receteilac rilac) { if (ModelState.IsValid) { _context.Add(rilac); await _context.SaveChangesAsync(); return(RedirectToAction("Index", "ReceteIlac", new { id = rilac.Rid })); } return(View(rilac)); }
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)); }
public async Task <IActionResult> DeleteConfirmed(int id) { var firma = _context.Firma.FirstOrDefault(m => m.Firmaid == id); _context.Firma.Remove(firma); await _context.SaveChangesAsync(); if (HttpContext.Session.GetString("grubu") == "A") { return(RedirectToAction(nameof(Grupfirma))); } else if (HttpContext.Session.GetString("grubu") == "B") { return(RedirectToAction(nameof(Firmafirma))); } else if (HttpContext.Session.GetString("grubu") == "C") { return(RedirectToAction(nameof(KulFirma))); } else if (HttpContext.Session.GetString("grubu") == "D") { return(RedirectToAction(nameof(KulFirma))); } return(View()); }
public async Task <IActionResult> Create([Bind("Mneden,Mtarihi,Sonrakimtarih,Annehastalikg,Babahastalikg,Kardeshastalikg,Cocukhastalikg,Büyüktan,Kücüktan,Nabiz,Kilo,Boy,Kangrup,Sicilno,Sicilnop,Grupid")] Muayene mu) { if (ModelState.IsValid) { _context.Add(mu); await _context.SaveChangesAsync(); 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> Create([Bind("Egitimtrh,Egitimalani,Toplamsure,Aciklama,Egitimkonulari,Sicilno")] Egitimler eg) { if (ModelState.IsValid) { _context.Add(eg); await _context.SaveChangesAsync(); if (HttpContext.Session.GetString("grubu") == "A") { return(RedirectToAction(nameof(Grupegitim))); } else if (HttpContext.Session.GetString("grubu") == "D") { return(RedirectToAction(nameof(kulFirmaegitim))); } } return(View(eg)); }
public async Task <IActionResult> Create([Bind("Sicilnop,Ad,Soyad,Unvan,Ogrenimdurum,Cinsiyet,Boy,Kilo,Isegiristrh,Dogumtarih,Dogumyer,Firmaid")] Personel per) { var sicil = _context.Personel.FirstOrDefault(a => a.Sicilnop == per.Sicilnop); if (sicil != null) { ViewBag.hata = "BU SİCİL DE BİR PERSONEL BULUNMAKTA"; } else { if (ModelState.IsValid) { _context.Add(per); 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))); } } ViewData["Firmaid"] = new SelectList(_context.Firma, "Firmaid", "Firmaid"); } return(View(per)); }