protected void Kaydet_Click(object sender, EventArgs e) { TBL_Bolgeler bolge = new TBL_Bolgeler(); bolge.dlt = 0; bolge.BolgeAdi = BolgeAdi.Text; bolge.Anchor1_ID = klas.kontrol(Anchor1_ID.Text, 0); bolge.Anchor2_ID = klas.kontrol(Anchor2_ID.Text, 0); bolge.Anchor3_ID = klas.kontrol(Anchor3_ID.Text, 0); bolge.AnchorMaster_ID = klas.kontrol(AnchorMaster_ID.Text, 0); bolge.Anchor1_Ip = Anchor1_Ip.Text; bolge.Anchor2_Ip = Anchor2_Ip.Text; bolge.Anchor3_Ip = Anchor3_Ip.Text; bolge.AnchorMaster_Ip = AnchorMaster_Ip.Text; bolge.Anchor1_Z = klas.kontrol(Anchor1_Z.Text, 0); bolge.Anchor2_Z = klas.kontrol(Anchor2_Z.Text, 0); bolge.Anchor3_Z = klas.kontrol(Anchor3_Z.Text, 0); bolge.Harita_ID = Convert.ToInt32(Request.QueryString["HaritaID"]); ctx.TBL_Bolgeler.Add(bolge); ctx.SaveChanges(); Response.Redirect("Zone.aspx?MapID=" + Request.QueryString["MapID"] + "&HaritaID=" + Request.QueryString["HaritaID"]); }
protected void Kaydet_Click(object sender, EventArgs e) { int ID = Convert.ToInt32(Request.QueryString["ID"]); TBL_Haritalar harita = ctx.TBL_Haritalar.SingleOrDefault(x => x.dlt == 0 && x.ID == ID); harita.HaritaAdi = HaritaAdi.Text; harita.Oran = Convert.ToInt32(Oran.Text); ctx.SaveChanges(); try { foreach (HttpPostedFile postedFile in FileUpload1.PostedFiles) { string uzanti = Path.GetExtension(postedFile.FileName); //if (uzanti == ".jpg" || uzanti == ".JPG" || uzanti == ".JPEG") //{ postedFile.SaveAs(Server.MapPath("/Content/Data/Map/") + harita.ID + ".jpg"); //} } } catch { } Response.Redirect("harita.aspx?MapID=" + harita.Map_ID); }
protected void Page_Load(object sender, EventArgs e) { RTLSEntities ctx = new RTLSEntities(); if (string.IsNullOrEmpty(Request.QueryString["dlt"]) == false) { int dlt = Convert.ToInt32(Request.QueryString["dlt"]); var sorgu = ctx.TBL_Map.SingleOrDefault(x => x.ID == dlt); sorgu.dlt = 1; sorgu.dlt_Zaman = DateTime.Now; ctx.SaveChanges(); } if (string.IsNullOrEmpty(Request.QueryString["d"]) == false) { string d = Request.QueryString["d"]; int id = Convert.ToInt32(Request.QueryString["id"]); if (id == 0) { TBL_Map dep = new TBL_Map(); dep.dlt = 0; dep.Map = Request.QueryString["name"]; ctx.TBL_Map.Add(dep); ctx.SaveChanges(); } else { TBL_Map dep = ctx.TBL_Map.SingleOrDefault(x => x.ID == id && x.dlt == 0); dep.Map = Request.QueryString["name"]; ctx.SaveChanges(); } Response.Redirect("map.aspx"); } var map = ctx.TBL_Map.Where(x => x.dlt == 0).OrderBy(x => x.Map); RList.DataSource = map.ToList(); RList.DataBind(); }
protected void Kaydet_Click(object sender, EventArgs e) { int id = Convert.ToInt32(Request.QueryString["id"]); var personel = ctx.TBL_Personel.SingleOrDefault(x => x.ID == id && x.dlt == 0); personel.Ad = Ad.Text; personel.Soyad = Soyad.Text; personel.TagNo = TagNo.Text; personel.Aciklama = Aciklama.Text; personel.Departman_ID = Convert.ToInt32(Departman_ID.SelectedValue); personel.Gorev_ID = Convert.ToInt32(Gorev_ID.SelectedValue); personel.Firma_ID = Convert.ToInt32(Firma_ID.SelectedValue); personel.KamraIp = KamraIp.Text; personel.TagTipi = TagTipi.SelectedValue; ctx.SaveChanges(); Response.Redirect("personel.aspx"); }
protected void Kaydet_Click(object sender, EventArgs e) { TBL_Personel personel = new TBL_Personel(); personel.Ad = Ad.Text; personel.Soyad = Soyad.Text; personel.TagNo = TagNo.Text; personel.Aciklama = Aciklama.Text; personel.Departman_ID = Convert.ToInt32(Departman_ID.SelectedValue); personel.Gorev_ID = Convert.ToInt32(Gorev_ID.SelectedValue); personel.Firma_ID = Convert.ToInt32(Firma_ID.SelectedValue); personel.KamraIp = KamraIp.Text; personel.TagTipi = TagTipi.SelectedValue; personel.dlt = 0; ctx.TBL_Personel.Add(personel); ctx.SaveChanges(); Response.Redirect("personel.aspx"); }
protected void Page_Load(object sender, EventArgs e) { RTLSEntities ctx = new RTLSEntities(); if (string.IsNullOrEmpty(Request.QueryString["dlt"]) == false) { int dlt = Convert.ToInt32(Request.QueryString["dlt"]); var sorgu = ctx.TBL_Haritalar.SingleOrDefault(x => x.ID == dlt); sorgu.dlt = 1; sorgu.dlt_Zaman = DateTime.Now; ctx.SaveChanges(); } int MapID = Convert.ToInt32(Request.QueryString["MapID"]); baslik.InnerHtml = ctx.TBL_Map.SingleOrDefault(x => x.ID == MapID).Map; var bolge = ctx.TBL_Haritalar.Where(x => x.dlt == 0 && x.Map_ID == MapID).OrderBy(x => x.HaritaAdi); RList.DataSource = bolge.ToList(); RList.DataBind(); }
protected void Kaydet_Click(object sender, EventArgs e) { int ID = Convert.ToInt32(Request.QueryString["ID"]); TBL_Bolgeler bolge = ctx.TBL_Bolgeler.SingleOrDefault(x => x.dlt == 0 && x.ID == ID); bolge.BolgeAdi = BolgeAdi.Text; bolge.Anchor1_ID = klas.kontrol(Anchor1_ID.Text, 0); bolge.Anchor2_ID = klas.kontrol(Anchor2_ID.Text, 0); bolge.Anchor3_ID = klas.kontrol(Anchor3_ID.Text, 0); bolge.AnchorMaster_ID = klas.kontrol(AnchorMaster_ID.Text, 0); bolge.Anchor1_Ip = Anchor1_Ip.Text; bolge.Anchor2_Ip = Anchor2_Ip.Text; bolge.Anchor3_Ip = Anchor3_Ip.Text; bolge.AnchorMaster_Ip = AnchorMaster_Ip.Text; bolge.Anchor1_Z = klas.kontrol(Anchor1_Z.Text, 0); bolge.Anchor2_Z = klas.kontrol(Anchor2_Z.Text, 0); bolge.Anchor3_Z = klas.kontrol(Anchor3_Z.Text, 0); ctx.SaveChanges(); Response.Redirect("Zone.aspx?MapID=" + Request.QueryString["MapID"] + "&HaritaID=" + Request.QueryString["HaritaID"]); }
protected void Page_Load(object sender, EventArgs e) { RTLSEntities ctx = new RTLSEntities(); if (string.IsNullOrEmpty(Request.QueryString["dlt"]) == false) { int dlt = Convert.ToInt32(Request.QueryString["dlt"]); var sorgu = ctx.TBL_Personel.SingleOrDefault(x => x.ID == dlt); sorgu.dlt = 1; ctx.SaveChanges(); } var personel = from p in ctx.TBL_Personel join f in ctx.TBL_Firmalar on p.Firma_ID equals f.ID join d in ctx.TBL_Departman on p.Departman_ID equals d.ID join g in ctx.TBL_Gorev on p.Gorev_ID equals g.ID where p.dlt == 0 select new { p.ID, p.Ad, p.Soyad, p.TagNo, p.TagTipi, p.KamraIp, f.Firma, d.Departman, g.Gorev }; RList.DataSource = personel.ToList(); RList.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { RTLSEntities ctx = new RTLSEntities(); gorevekle.Visible = false; if (string.IsNullOrEmpty(Request.QueryString["dlt"]) == false) { int dlt = Convert.ToInt32(Request.QueryString["dlt"]); var sorgu = ctx.TBL_Departman.SingleOrDefault(x => x.ID == dlt); sorgu.dlt = 1; ctx.SaveChanges(); } if (string.IsNullOrEmpty(Request.QueryString["dltG"]) == false) { int dlt = Convert.ToInt32(Request.QueryString["dltG"]); var sorgu = ctx.TBL_Gorev.SingleOrDefault(x => x.ID == dlt); sorgu.dlt = 1; ctx.SaveChanges(); } if (string.IsNullOrEmpty(Request.QueryString["d"]) == false) { string d = Request.QueryString["d"]; int id = Convert.ToInt32(Request.QueryString["id"]); if (d == "departman") { if (id == 0) { TBL_Departman dep = new TBL_Departman(); dep.dlt = 0; dep.Departman = Request.QueryString["name"]; ctx.TBL_Departman.Add(dep); ctx.SaveChanges(); } else { TBL_Departman dep = ctx.TBL_Departman.SingleOrDefault(x => x.ID == id && x.dlt == 0); dep.Departman = Request.QueryString["name"]; ctx.SaveChanges(); } Response.Redirect("departman.aspx"); } else if (d == "gorev") { if (id == 0) { TBL_Gorev gor = new TBL_Gorev(); gor.dlt = 0; gor.Gorev = Request.QueryString["name"]; gor.Departman_ID = Convert.ToInt32(Request.QueryString["DID"]); ctx.TBL_Gorev.Add(gor); ctx.SaveChanges(); } else { TBL_Gorev gor = ctx.TBL_Gorev.SingleOrDefault(x => x.ID == id && x.dlt == 0); gor.Gorev = Request.QueryString["name"]; ctx.SaveChanges(); } Response.Redirect("departman.aspx?DID=" + Request.QueryString["DID"]); } } var departman = ctx.TBL_Departman.Where(x => x.dlt == 0).OrderBy(x => x.Departman); RList.DataSource = departman.ToList(); RList.DataBind(); if (string.IsNullOrEmpty(Request.QueryString["DID"]) == false) { gorevekle.Visible = true; int DID = Convert.ToInt32(Request.QueryString["DID"]); var dep = ctx.TBL_Departman.SingleOrDefault(x => x.ID == DID); gorevBaslik.InnerHtml = dep.Departman + " Görevleri"; var gorev = ctx.TBL_Gorev.Where(x => x.dlt == 0 && x.Departman_ID == DID).OrderBy(x => x.Gorev); RListG.DataSource = gorev.ToList(); RListG.DataBind(); } }