示例#1
0
        protected override void ShowEntityData()
        {
            Cihaz cihaz = ((Cihaz)infoformentity);

            if (cihaz != null)
            {
                if (cihaz.CihazModeli.Id > 0)
                {
                    LookupTable cihazmodeli = Persistence.Read <LookupTable>(cihaz.CihazModeli.Id);
                    editButtonCihazTuru.Id   = cihazmodeli.Id;
                    editButtonCihazTuru.Text = cihazmodeli.Adi;
                    cihaz.CihazModeli        = cihazmodeli;
                }

                if (cihaz.Lokasyon.Id > 0)
                {
                    Lokasyon lokasyon = Persistence.Read <Lokasyon>(cihaz.Lokasyon.Id);
                    editButtonLokasyon.Id   = lokasyon.Id;
                    editButtonLokasyon.Text = lokasyon.Adi;
                    cihaz.Lokasyon          = lokasyon;
                }

                textEditAdi.Text      = cihaz.Adi;
                textEditkodu.Text     = cihaz.Kodu;
                memoEditAciklama.Text = cihaz.Aciklama;
                myComboCihazTuru.Id   = (int)cihaz.CihazTuru;
                ShowEntityDataGrid();
            }
        }
示例#2
0
        public ActionResult DeleteConfirmed(int id)
        {
            Lokasyon lokasyon = db.Lokasyon.Find(id);

            db.Lokasyon.Remove(lokasyon);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#3
0
 public ActionResult Edit([Bind(Include = "Lokasyon_ID,Lokasyon_Adi,Lokasyon_Tipi,Lokasyon_Status,Lokasyon_CreateDate")] Lokasyon lokasyon)
 {
     if (ModelState.IsValid)
     {
         db.Entry(lokasyon).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(lokasyon));
 }
示例#4
0
 public ActionResult Edit([Bind(Include = "Id,Il,Ilce,SemtBelde,Mahalle,PostaKodu")] Lokasyon lokasyon)
 {
     if (ModelState.IsValid)
     {
         db.Entry(lokasyon).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(lokasyon));
 }
示例#5
0
        protected override void UpdateEntityData()
        {
            Lokasyon sablon = ((Lokasyon)infoformentity);

            sablon.Adi            = textEditAdi.Text;
            sablon.Kodu           = textEditkodu.Text;
            sablon.Aciklama       = memoEditAciklama.Text;
            sablon.UstLokasyon.Id = editButtonLokasyon.Id;
            sablon.Adres.Id       = editButtonHataAdresi.Id;
            //sablon.SablonTuru=(myenum.IzlemTuru)ucEnumGosterSablonTuru.Deger;
        }
示例#6
0
        public ActionResult Create([Bind(Include = "Id,Il,Ilce,SemtBelde,Mahalle,PostaKodu")] Lokasyon lokasyon)
        {
            if (ModelState.IsValid)
            {
                db.Lokasyon.Add(lokasyon);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(lokasyon));
        }
示例#7
0
        public ActionResult Create([Bind(Include = "Lokasyon_ID,Lokasyon_Adi,Lokasyon_Tipi,Lokasyon_Status,Lokasyon_CreateDate")] Lokasyon lokasyon)
        {
            if (ModelState.IsValid)
            {
                lokasyon.Lokasyon_Status     = (int)DBStatus.Active;
                lokasyon.Lokasyon_CreateDate = DateTime.Now;
                db.Lokasyon.Add(lokasyon);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(lokasyon));
        }
示例#8
0
        // GET: Lokasyon/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Lokasyon lokasyon = db.Lokasyon.Find(id);

            if (lokasyon == null)
            {
                return(HttpNotFound());
            }
            return(View(lokasyon));
        }
示例#9
0
        // GET: Lokasyon/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Lokasyon lokasyon = db.Lokasyon.Find(id);

            if (lokasyon == null)
            {
                return(HttpNotFound());
            }
            lokasyon.Lokasyon_Status = (int)DBStatus.Deleted;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#10
0
 public void ShowEntityData(Lokasyon lk)
 {
     //dt.Add(lk);
     //int id = 0;
     //listBox2.Items.Clear();
     //foreach (Lokasyon lks in dt)
     //{
     //    id++;
     //    listBox2.Items.Add(id + " " + lks);
     //}
     dt.Add(lk);
     listBoxhatalilokasyonlar.Items.Add(lk);
     //foreach (Lokasyon item in dt)
     //{
     //    listBoxhatalilokasyonlar.Items.Add(item);
     //}
 }
示例#11
0
        protected override void ShowEntityData()
        {
            Lokasyon sablon = ((Lokasyon)infoformentity);

            textEditAdi.Text      = sablon.Adi;
            textEditkodu.Text     = sablon.Kodu;
            memoEditAciklama.Text = sablon.Aciklama;
            if (sablon.UstLokasyon.Id > 0)
            {
                Lokasyon ustlokasyon = Persistence.Read <Lokasyon>(sablon.UstLokasyon.Id);
                editButtonLokasyon.Id   = ustlokasyon.Id;
                editButtonLokasyon.Text = ustlokasyon.Adi;
                sablon.UstLokasyon      = ustlokasyon;
            }

            if (sablon.Adres.Id > 0)
            {
                Adres adres = Persistence.Read <Adres>(sablon.Adres.Id);
                editButtonHataAdresi.Id   = adres.Id;
                editButtonHataAdresi.Text = adres.TagAdresi;
                sablon.Adres = adres;
            }
        }
示例#12
0
 public async Task Post([FromBody] Lokasyon value)
 {
     await MapperFactory.CreateSession <Lokasyon>().Save(value);
 }
示例#13
0
        public override void showdata()
        {
            base.showdata();

            edtadi.Text                       = DoktorEntity.Adi;
            edttckno.Text                     = DoktorEntity.TckNo.ToString();
            edtdiplomano.Text                 = DoktorEntity.Diplomano;
            edtsoyadi.Text                    = DoktorEntity.Soyadi;
            textEditCepTel.Text               = DoktorEntity.Ceptel;
            textEditEvTel.Text                = DoktorEntity.Evtel;
            textEditKontur.Text               = DoktorEntity.Kontur.ToString();
            textEditTescilNo.Text             = DoktorEntity.TescilNo;
            textEditUniversite.Text           = DoktorEntity.Universite;
            textEditUnvan.Text                = DoktorEntity.Unvan;
            textEditWebServiskullaniciNo.Text = DoktorEntity.WebServisKullaniciNo.ToString();
            textEditWebServisSifre.Text       = DoktorEntity.WebServisSifre;
            dateEditGorevBasTar.EditValue     = DoktorEntity.GorevBasTar;
            dateEditGorevBitTar.EditValue     = DoktorEntity.GorevBitTar;
            dateEditMezuniyetTarihi.EditValue = DoktorEntity.MezuniyetTarihi;
            ucEnumGosterBrans.Deger           = (myenum.Brans)DoktorEntity.Brans;
            ucEnumGosterCinsiyet.Deger        = (myenum.Cinsiyet)DoktorEntity.Cinsiyeti;

            ucEnumGosterGorevDurumu.Deger = (myenum.GorevDurumu)DoktorEntity.GorevDurumu;
            DataEditdogumtarihi.EditValue = DoktorEntity.Dogumtar;
            superTextBoxWebTUIKServisKullaniciNo.textBox.Text = DoktorEntity.WebTUIKServisKullaniciNo.ToString();
            textBoxWebTUIKServisSifre.Text = DoktorEntity.WebTUIKServisSifre;

            if (DoktorEntity.LokasyonSehir.Id > 0)
            {
                Lokasyon lil = Persistence.Read <Lokasyon>(DoktorEntity.LokasyonSehir.Id);
                if (lil != null)
                {
                    cmbevil.SelectedValue = lil.Id;
                }
            }
            if (DoktorEntity.Lokasyonilce.Id > 0)
            {
                Lokasyon lilce = Persistence.Read <Lokasyon>(DoktorEntity.Lokasyonilce.Id);
                if (lilce != null)
                {
                    cmbevilce.SelectedValue = lilce.Id;
                }
            }
            if (DoktorEntity.LokasyonSemtBelediye.Id > 0)
            {
                Lokasyon lsb = Persistence.Read <Lokasyon>(DoktorEntity.LokasyonSemtBelediye.Id);
                if (lsb != null)
                {
                    cmbevsemt.SelectedValue = lsb.Id;
                }
            }
            if (DoktorEntity.LokasyonMahalleKoy.Id > 0)
            {
                Lokasyon lmk = Persistence.Read <Lokasyon>(DoktorEntity.LokasyonMahalleKoy.Id);
                if (lmk != null)
                {
                    cmbevkoymh.SelectedValue = lmk.Id;
                }
            }
            if (DoktorEntity.LokasyonMahalle.Id > 0)
            {
                Lokasyon lm = Persistence.Read <Lokasyon>(DoktorEntity.LokasyonMahalle.Id);
                if (lm != null)
                {
                    cmbevmh.SelectedValue = lm.Id;
                }
            }
        }
示例#14
0
        public frmCihazIzlem()
        {
            InitializeComponent();

            OPCServer opcserver = Persistence.Read <OPCServer>(new Condition("Aktif", Operator.Equal, 1));

            if (opcserver != null && opcserver.Id > 0)
            {
//                mymodel.Adres[] adresler = Persistence.ReadList<Adres>(@"
//                Select
//                    Adres.*
//                From Adres
//                Inner Join CihazAdres on CihazAdres.Adres_Id=Adres.Id and CihazAdres.Aktif=1
//                Where
//                CihazAdres.AdresTipi in ('OkunacakAdres','AlarmAdresi')
//                and Adres.Aktif=@prm0 ",new object[]{true});

                lokasyons = Persistence.ReadList <Lokasyon>("Select * From Lokasyon Where Aktif=@prm0", new object[] { 1 });;
                treeListLokasyon.DataSource = lokasyons;
                Hashtable adreslist = new Hashtable();
                Utility.SetGridStyle(treeListLokasyon);
                //foreach (Adres ent in adresler)
                //{
                //    adreslist.Add(ent.TagAdresi);
                //    listBox1.Items.Add(ent.tagadresi);
                //}
                foreach (Lokasyon lksyn in lokasyons)
                {
                    if (lksyn.Adres.Id > 0)
                    {
                        lksyn.Adres = Persistence.Read <Adres>(lksyn.Adres.Id);
                        adreslist.Add(lksyn.Kodu, lksyn);
                        listBox1.Items.Add(lksyn.Adres.TagAdresi);
                    }
                }

                mngr = null;
                //mngr = new OpcManager(adreslist);
                mngr = new OpcManager();
                mngr.OPCServerConnect(opcserver.OpcServerName, opcserver.OPCNodeName);
                OPCServerGroup[] groups = OPCServer.ReadGroups(opcserver.Id);
                if (groups != null && groups.Length > 0)
                {
                    opcserver.Groups.AddRange(groups);

                    foreach (OPCServerGroup group in opcserver.Groups)
                    {
                        mngr.AddOpcGroupServer(group.OPCGroupName, group.GroupUpdateRate, group.GroupActiveState, (float)group.GroupDeadBand);


                        List <string> list = new List <string>();
                        Lokasyon      lks  = (Lokasyon)adreslist[group.OPCGroupName];
                        if (lks != null)
                        {
                            list.Add(lks.Adres.TagAdresi);
                            mngr.SetOpcItems("lks" + lks.Kodu, list);
                            mngr.OPCAddItems(lks.Kodu);

                            List <OpcItems> items = mngr.GetOPCItem.FindAll(p => p != null && p.OPCItemName == lks.Adres.TagAdresi && (p.OpcGroupName == group.OPCGroupName || p.OpcGroupName == "lks" + group.OPCGroupName));
                            foreach (OpcItems item in items)
                            {
                                item.OPCItemValueChange += new OPCItemValueChangeEventHandler(Opcitemchange);
                            }
                        }
                    }
                    foreach (OPCAutomation.OPCGroupClass group in mngr.ConnectedOPCServer.OPCGroups)
                    {
                        group.DataChange += mngr.ConnectedGroup_DataChange;
                    }
                    mngr.ConnectedOPCServer.OPCGroups.GlobalDataChange += new OPCAutomation.DIOPCGroupsEvent_GlobalDataChangeEventHandler(mngr.OPCGroups_GlobalDataChange);

                    //foreach (Lokasyon lsyn in lokasyons)
                    //{
                    //    List<OpcItems> items = mngr.GetOPCItem.FindAll(p => p != null && p.OPCItemName == lsyn.Adres.TagAdresi);
                    //    foreach (OpcItems item in items)
                    //    {
                    //        item.OPCItemValueChange += new OPCItemValueChangeEventHandler(Opcitemchange);
                    //    }
                    //}



                    //mngr.AddOpcGroupServer(opcserver.OPCGroupName, (opcserver.GroupUpdateRate), (opcserver.GroupActiveState), (float)opcserver.GroupDeadBand);
                    //mngr.OPCAddItems();
                    //SetDataControlsReadOnlyRecursive(this);
                }
            }
            else
            {
                MessageBox.Show("Bağlanılacak OPC Server Bulunamadı.\nOPC Server Tanım Ekranında gerekli tanımlamayı yapınız");
                return;
            }
        }
示例#15
0
        public override void showdata()
        {
            Hasta hasta = (Hasta)formEntity;

            ucKayitDurumu1.Deger       = (myenum.KayitDurumu)hasta.KayitDurumu;
            usKayitKimlikDurumu1.Deger = (myenum.KayitKimlikDurumu)hasta.KayitKimlikDurumu;
            if (hasta.TckNo > 0)
            {
                TextEdittckno1.Text = hasta.TckNo.ToString();
            }
            TextEditpasaportno1.Text = hasta.PasaportNo;

            TextEditAdi.Text    = hasta.Adi;
            TextEditsoyadi.Text = hasta.Soyadi;

            edtbeyanadresi.Text           = hasta.BeyanAdresi;
            hasta.Uyruk.Id                = myCombo1.Id;
            hasta.Ulke.Id                 = editButtonUlkesi.Id;
            ucSosyalGuvenlikKurumu1.Deger = (myenum.SosyalGuvenlikKurumTipi)hasta.KurumTipi;
            ucEnumGosterMedeniHali.Deger  = (myenum.MedeniHali)hasta.MedeniHali;
            edtsicilno.EditValue          = hasta.KurumSicilNo;

            ucKanGrubu1.Deger        = (myenum.KanGrubu)hasta.KanGrubu;
            maskedTextBoxEvtel.Text  = hasta.EvTel;
            maskedTextBoxCepTel.Text = hasta.CepTel;
            maskedTextBoxIstel.Text  = hasta.IsTel;
            editButtonUlkesi.Id      = hasta.Id;
            editButtonUlkesi.Text    = hasta.Ulke.Adi;

            checkBoxÖzürlüHasta.Checked = hasta.OzurluHasta;
            checkBoxGeziciHizmetVerilenHasta.Checked = hasta.GeziciHizmetVerilenHasta;
            cbeskihastam.Checked = hasta.EskiHasta;
            checkBoxYardimaMuhtacHasta.Checked = hasta.YardimaMuhtacHasta;

            //evadres bilgileri
            cbev.Checked        = hasta.AdresTip == myenum.AdresTip.EvAdresi;
            cbis.Checked        = hasta.AdresTip == myenum.AdresTip.IsAdresi;
            edtevacikadres.Text = hasta.LokasyonAdresText;
            edtevickapino.Text  = hasta.LokasyonIcKapiNo;
            edtevdiskapino.Text = hasta.LokasyonDısKapiNo;
            if (hasta.LokasyonSehir.Id > 0)
            {
                Lokasyon lil = Persistence.Read <Lokasyon>(hasta.LokasyonSehir.Id);
                if (lil != null)
                {
                    cmbevil.SelectedValue = lil.Id;
                }
            }
            if (hasta.Lokasyonilce.Id > 0)
            {
                Lokasyon lilce = Persistence.Read <Lokasyon>(hasta.Lokasyonilce.Id);
                if (lilce != null)
                {
                    cmbevilce.SelectedValue = lilce.Id;
                }
            }
            if (hasta.LokasyonSemtBelediye.Id > 0)
            {
                Lokasyon lsb = Persistence.Read <Lokasyon>(hasta.LokasyonSemtBelediye.Id);
                if (lsb != null)
                {
                    cmbevsemt.SelectedValue = lsb.Id;
                }
            }
            if (hasta.LokasyonMahalleKoy.Id > 0)
            {
                Lokasyon lmk = Persistence.Read <Lokasyon>(hasta.LokasyonMahalleKoy.Id);
                if (lmk != null)
                {
                    cmbevkoymh.SelectedValue = lmk.Id;
                }
            }
            if (hasta.LokasyonMahalle.Id > 0)
            {
                Lokasyon lm = Persistence.Read <Lokasyon>(hasta.LokasyonMahalle.Id);
                if (lm != null)
                {
                    cmbevmh.SelectedValue = lm.Id;
                }
            }
            //ev------------------------------------------------------------------------

            //işadres bilgileri
            edtisacikadres.Text = hasta.LokasyonAdresText1;
            edtisickapino.Text  = hasta.LokasyonIcKapiNo1;
            edtisdiskapino.Text = hasta.LokasyonDısKapiNo1;
            if (hasta.LokasyonSehir1.Id > 0)
            {
                Lokasyon lil = Persistence.Read <Lokasyon>(hasta.LokasyonSehir1.Id);
                if (lil != null)
                {
                    cmbisil.SelectedValue = lil.Id;
                }
            }
            if (hasta.Lokasyonilce1.Id > 0)
            {
                Lokasyon lilce = Persistence.Read <Lokasyon>(hasta.Lokasyonilce1.Id);
                if (lilce != null)
                {
                    cmbisilce.SelectedValue = lilce.Id;
                }
            }
            if (hasta.LokasyonSemtBelediye1.Id > 0)
            {
                Lokasyon lsb = Persistence.Read <Lokasyon>(hasta.LokasyonSemtBelediye1.Id);
                if (lsb != null)
                {
                    cmbissemt.SelectedValue = lsb.Id;
                }
            }
            if (hasta.LokasyonMahalleKoy1.Id > 0)
            {
                Lokasyon lmk = Persistence.Read <Lokasyon>(hasta.LokasyonMahalleKoy1.Id);
                if (lmk != null)
                {
                    cmbiskoymh.SelectedValue = lmk.Id;
                }
            }
            if (hasta.LokasyonMahalle1.Id > 0)
            {
                Lokasyon lm = Persistence.Read <Lokasyon>(hasta.LokasyonMahalle1.Id);
                if (lm != null)
                {
                    cmbismh.SelectedValue = lm.Id;
                }
            }
            //iş------------------------------------------------------------------------

            //tuikten alınacağından update kullanıcı tarafından yapılamaz
            //nüfus cüzdan bilgileri-----------------------------------------------------
            edtnfanaadi.Text            = hasta.NfAnaAd ?? "" + " " + hasta.NfAnaSoyad ?? "";
            edtnfbabaadi.Text           = hasta.NfBabaAd ?? "" + " " + hasta.NfBabaSoyad ?? "";
            edtnfdogumtarihi.Text       = hasta.NfDogumTarih;
            edtnfdogumyeri.Text         = hasta.NfDogumYer;
            edtnfkayitliailesirano.Text = hasta.NfAileSiraNo ?? "" + "-" + hasta.NfBireySiraNo ?? "";
            edtnfkayitliciltno.Text     = hasta.NfCiltKod;
            edtnfkayitliil.Text         = hasta.NfKayIlAd;
            edtnfkayitliilce.Text       = hasta.NfKayIlceAd;
            edtnfserino.Text            = hasta.NfCuzdanSeri;
            edtnfsirano.Text            = hasta.NfCuzdanNo;
            edtnfvarildigiyer.Text      = hasta.NfVerildigiIlceAd;
            edtnfverilisnedeni.Text     = hasta.NfverilmeNeden;
            edtnfverilistarihi.Text     = hasta.NfVerilmeTarih;
            edtnfdini.Text       = hasta.NfDin;
            edtnfmedenihali.Text = hasta.NfMedeniHal;
            edtnfolumtarihi.Text = hasta.NfOlumTarih;
            edtnfolumyer.Text    = hasta.NfOlumYer;
            //TUIK adres bilgileri-----------------------------------------------------
            edttuikacikadres.Text   = hasta.TUIKAcikAdres();
            TextEdittuikadresi.Text = hasta.TUIKAcikAdres();
            edttuikbucak.Text       = hasta.TUIKBucak;
            edttuikkoy.Text         = hasta.TUIKKoy;
            edttuikmh.Text          = hasta.TUIKMahalle;
            edttuikcsbm.Text        = hasta.TUIKCsbm;
            edttuikickapino.Text    = hasta.TUIKIcKapiNo;
            edttuikdiskapino.Text   = hasta.TUIKDisKapiNo;
            edttuikil.Text          = hasta.TUIKIl;
            edttuikilce.Text        = hasta.TUIKIlce;
            //----------------------------------------------------------------


            if (hasta.DogumTarihi != DateTime.MinValue)
            {
                dateEditBeyanDogumTarihi.DateTime = hasta.BeyanDogumTarihi;
            }
            if (hasta.Resim != null)
            {
                SetResim();
            }
            else
            {
                pictureBox1.Image = null;
            }
            if (hasta.DogumTarihi != DateTime.MinValue)
            {
                DateEditdogumtarihi.DateTime = hasta.DogumTarihi;
            }

            ucEnumGoster1.Deger = (myenum.Cinsiyet)hasta.Cinsiyeti;
        }