private void DataGridIlkKayitYazdir(DataGridView dataGridView1, string listeIsmi) { Ciftci ciftci = new Ciftci(); int ilkKayitDilekceNo = (int)dataGridView1.SelectedRows[0].Cells[0].Value; ciftci = ciftciService.Get(ilkKayitDilekceNo, listeIsmi); txtDilekceNo.Text = ciftci.dilekceno.ToString(); txtTc.Text = ciftci.tc; txtIsim.Text = ciftci.isim; txtSoyisim.Text = ciftci.soyisim; cmbMahalle.Text = ciftci.mahalle; txtTarih.Text = ciftci.tarih.ToShortDateString(); richtxtAciklama.Text = ciftci.aciklama; txtTelefon.Text = ciftci.telefon; if (ciftci.KayitDurumu == 0) { checkbxYeniKayit.Checked = false; pictureBoxYeni.Visible = false; } else if (ciftci.KayitDurumu == 1) { checkbxYeniKayit.Checked = true; pictureBoxYeni.Visible = true; } }
private void DgwListe_Click(object sender, EventArgs e) { DataGridView dgw = sender as DataGridView; int secilen = dgw.SelectedCells[0].RowIndex; txtDilekceNo.Text = dgw.Rows[secilen].Cells["dilekceno"].Value.ToString(); txtTc.Text = dgw.Rows[secilen].Cells["tc"].Value.ToString(); txtIsim.Text = dgw.Rows[secilen].Cells["isim"].Value.ToString(); txtSoyisim.Text = dgw.Rows[secilen].Cells["soyisim"].Value.ToString(); cmbMahalle.Text = dgw.Rows[secilen].Cells["mahalle"].Value.ToString(); DateTime tarih = (DateTime)dgw.Rows[secilen].Cells["tarih"].Value; txtTarih.Text = tarih.ToShortDateString(); richtxtAciklama.Text = dgw.Rows[secilen].Cells["aciklama"].Value.ToString(); txtTelefon.Text = dgw.Rows[secilen].Cells["telefon"].Value.ToString(); string kayitDurumu = dgw.Rows[secilen].Cells["kayitdurumu"].Value.ToString(); int KayitDurumuInt = Convert.ToInt16(kayitDurumu); if (KayitDurumuInt == 1) { checkbxYeniKayit.Checked = true; } else { checkbxYeniKayit.Checked = false; } currentCiftci = new Ciftci(); //currentCiftci.dilekceno =Convert.ToInt16( txtDilekceNo.Text); currentCiftci.isim = txtIsim.Text; currentCiftci.soyisim = txtSoyisim.Text; currentCiftci.tc = txtTc.Text; }
public static Ciftci IsletmeBilgileri() { Ciftci person = new Ciftci(); var Isim = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtNameCorporationType1")); var Soyisim = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtSurname")); var Mahalle = driver.FindElement(By.Name("ctl00$ctl00$bodyCPH$ContentPlaceHolder1$HoldingDetailControl$CityTownVillageControl$edtVillageId")); var Cinsiyet = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_HoldingDetailControl_txtGender")); var BabaAdi = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtFatherName")); var AnneAdi = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtMotherName")); var DogumTarihi = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtBirthdate")); var MedeniDurum = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_HoldingDetailControl_txtMaritalStatus")); var Il = driver.FindElement(By.Id("ctl00_ctl00_bodyCPH_ContentPlaceHolder1_HoldingDetailControl_CityTownVillageControl_edtCityId_Input")); var Ilce = driver.FindElement(By.Name("ctl00$ctl00$bodyCPH$ContentPlaceHolder1$HoldingDetailControl$CityTownVillageControl$edtTownId")); var CepTelefonu = driver.FindElement(By.Id("ctl00_ctl00_bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtMobilePhone")); var EvTelefonu = driver.FindElement(By.Id("ctl00_ctl00_bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtPhone")); var Email = driver.FindElement(By.Id("ctl00_ctl00_bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtEmail")); person.NameSurname = Isim.Text + " " + Soyisim.Text; person.Village = Mahalle.GetAttribute("value"); person.Gender = Cinsiyet.Text; person.FatherName = BabaAdi.Text; person.MotherName = AnneAdi.Text; person.Birthday = DogumTarihi.Text; person.MaritalStatus = MedeniDurum.Text; person.City = Il.GetAttribute("value"); person.Town = Ilce.GetAttribute("value"); person.MobilePhone = CepTelefonu.GetAttribute("value"); person.HomePhone = EvTelefonu.GetAttribute("value"); person.Email = Email.Text; return(person); }
private Ciftci FormToEntity() { if (txtTc.Text.Length != 11) { throw new Exception("Tc Numarasını kontrol ediniz."); } Ciftci ciftci = new Ciftci() { TcKimlikNo = string.IsNullOrEmpty(txtTc.Text) ? "" : txtTc.Text, NameSurname = string.IsNullOrEmpty(txtNameSurname.Text) ? "" : txtNameSurname.Text, FatherName = string.IsNullOrEmpty(txtFatherName.Text) ? "" : txtFatherName.Text, MotherName = string.IsNullOrEmpty(txtMotherName.Text) ? "" : txtMotherName.Text, Birthday = string.IsNullOrEmpty(txtBirthday.Text) ? "" : txtBirthday.Text, DateOfDeath = string.IsNullOrEmpty(txtYearOfDeath.Text) ? "" : txtYearOfDeath.Text, Gender = string.IsNullOrEmpty(comboBoxGender.Text) ? "" : comboBoxGender.Text, MaritalStatus = string.IsNullOrEmpty(comboBoxMaritalStatus.Text) ? "" : comboBoxMaritalStatus.Text, MobilePhone = string.IsNullOrEmpty(txtMobilePhone.Text) ? "" : txtMobilePhone.Text, HomePhone = string.IsNullOrEmpty(txtHomePhone.Text) ? "" : txtHomePhone.Text, Email = string.IsNullOrEmpty(txtEmail.Text) ? "" : txtEmail.Text, City = string.IsNullOrEmpty(txtCity.Text) ? "" : txtCity.Text, Town = string.IsNullOrEmpty(txtTown.Text) ? "" : txtTown.Text, Village = string.IsNullOrEmpty(comboBoxVillage.Text) ? "" : comboBoxVillage.Text, Not = string.IsNullOrEmpty(txtNote.Text) ? "" : txtNote.Text }; return(ciftci); }
private void dgwList_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { Utilities.ErrorHandle._try(() => { int index = dgwList.CurrentCell.RowIndex; string Tc = dgwList.Rows[index].Cells["TcKimlikNo"].Value.ToString(); _activeCiftci = _ciftcilerManager.GetByTc(Tc); //gelen çiftçinin Id sini txttc tag içerisinde saklıyoruz.... txtTc.Tag = (object)_activeCiftci.Id; txtTc.Text = _activeCiftci.TcKimlikNo; txtNameSurname.Text = _activeCiftci.NameSurname; txtFatherName.Text = _activeCiftci.FatherName; txtMotherName.Text = _activeCiftci.MotherName; txtBirthday.Text = _activeCiftci.Birthday.Substring(0, 10); txtYearOfDeath.Text = _activeCiftci.DateOfDeath; comboBoxGender.Text = _activeCiftci.Gender; comboBoxMaritalStatus.Text = _activeCiftci.MaritalStatus; txtMobilePhone.Text = _activeCiftci.MobilePhone; txtHomePhone.Text = _activeCiftci.HomePhone; txtEmail.Text = _activeCiftci.Email; txtCity.Text = _activeCiftci.City; txtTown.Text = _activeCiftci.Town; comboBoxVillage.Text = _activeCiftci.Village; txtNote.Text = _activeCiftci.Not; btnAdd.Text = "Güncelle"; Islem = Operation.GuncellemeIslemi; }); }
public void TcNoGiris(IWebDriver driver, Ciftci c) { IWebElement txtTC = driver.FindElement(By.Id("ctl00_ctl00_bodyCPH_ContentPlaceHolder1_HoldingSearchControlUC_RadPanelBar1_i0_edtIdNo11")); txtTC.Click(); txtTC.SendKeys(c.tc); ClickGercekKisiAra(driver, c); }
private void dgwList_CellClick(object sender, DataGridViewCellEventArgs e) { Utilities.ErrorHandle._try(() => { int index = dgwList.CurrentCell.RowIndex; string Tc = dgwList.Rows[index].Cells["TcKimlikNo"].Value.ToString(); _activeCiftci = _ciftcilerManager.GetByTc(Tc); }); }
public Ciftci IsletmeBilgi() { Stop(1); Ciftci isletmeBilgileri = new Ciftci(); string nameId = "bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtNameCorporationType1"; string soyadId = "bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtSurname"; string babaAdiId = "bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtFatherName"; string anneAdiId = "bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtMotherName"; string dogumTarihiId = "bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtBirthdate"; string olumTarihiId = "bodyCPH_ContentPlaceHolder1_HoldingDetailControl_lbledtDeathOrCloseDateCorporationType1"; string cinsiyetId = "bodyCPH_ContentPlaceHolder1_HoldingDetailControl_txtGender"; string medeniDurumId = "bodyCPH_ContentPlaceHolder1_HoldingDetailControl_txtMaritalStatus"; string cepTelefonuId = "ctl00_ctl00_bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtMobilePhone"; string evTelfonuId = "ctl00_ctl00_bodyCPH_ContentPlaceHolder1_HoldingDetailControl_edtPhone"; string ilId = "ctl00_ctl00_bodyCPH_ContentPlaceHolder1_HoldingDetailControl_CityTownVillageControl_edtCityId_Input"; string ilceId = "ctl00_ctl00_bodyCPH_ContentPlaceHolder1_HoldingDetailControl_CityTownVillageControl_edtTownId_Input"; string koyMahalleId = "ctl00_ctl00_bodyCPH_ContentPlaceHolder1_HoldingDetailControl_CityTownVillageControl_edtVillageId_Input"; string name = driver.FindElement(By.Id(nameId)).Text; string soyad = driver.FindElement(By.Id(soyadId)).Text; string babaAdi = driver.FindElement(By.Id(babaAdiId)).Text; string anneAdi = driver.FindElement(By.Id(anneAdiId)).Text; string dogumTarihi = driver.FindElement(By.Id(dogumTarihiId)).Text; try { string olumTarihi = driver.FindElement(By.Id(olumTarihiId)).Text; isletmeBilgileri.OlumTarihi = olumTarihi; } catch (Exception) { isletmeBilgileri.OlumTarihi = string.Empty; } string cinsiyet = driver.FindElement(By.Id(cinsiyetId)).Text; string medeniDurum = driver.FindElement(By.Id(medeniDurumId)).Text; string cepTelefonu = driver.FindElement(By.Id(cepTelefonuId)).GetAttribute("value"); string evTelfonu = driver.FindElement(By.Id(evTelfonuId)).GetAttribute("value"); string il = driver.FindElement(By.Id(ilId)).GetAttribute("value"); string ilce = driver.FindElement(By.Id(ilceId)).GetAttribute("value"); string koyMahalle = driver.FindElement(By.Id(koyMahalleId)).GetAttribute("value"); isletmeBilgileri.Ad = name; isletmeBilgileri.Soyad = soyad; isletmeBilgileri.BabaAdi = babaAdi; isletmeBilgileri.AnneAdi = anneAdi; isletmeBilgileri.DogumTarihi = Convert.ToDateTime(dogumTarihi); isletmeBilgileri.Cinsiyet = cinsiyet; isletmeBilgileri.MedeniDurum = medeniDurum; isletmeBilgileri.CepTelefon = cepTelefonu; isletmeBilgileri.EvTelefon = evTelfonu; isletmeBilgileri.Il = il; isletmeBilgileri.Ilce = ilce; isletmeBilgileri.KoyMahalle = koyMahalle; return(isletmeBilgileri); }
public void ClickGercekKisiAra(IWebDriver driver, Ciftci c) { bekle(); IWebElement btnGercekKisiAra = driver.FindElement(By.Name("ctl00$ctl00$bodyCPH$ContentPlaceHolder1$HoldingSearchControlUC$RadPanelBar1$i0$btnSearch11")); btnGercekKisiAra.Click(); bekle(); IWebElement btnDetay = driver.FindElement(By.Id("ctl00_ctl00_bodyCPH_ContentPlaceHolder1_grdList_ctl00_ctl04_EditButton")); btnDetay.Click(); }
private static void KayitFormuDoldur(Ciftci c, string _isim, string _soyisim, string _mahalle, string _cinsiyet, string _babaAdi, string _anneAdi, string _dogumTarihi, string _il, string _ilce) { string currentDirectory = Directory.GetCurrentDirectory(); DirectoryInfo directoryInfo = new DirectoryInfo(currentDirectory); string fullName = directoryInfo.FullName; string kayitFormuPath = fullName + "\\word\\ÇKF-(A-Kişisel Bilgiler).docx"; if (File.Exists(kayitFormuPath)) { wordeAktar.Application wordapp = new wordeAktar.Application(); wordapp.Visible = true; wordeAktar.Document worddoc; object missing = System.Reflection.Missing.Value; object readOnly = false; object fileName = kayitFormuPath; worddoc = wordapp.Documents.Open(ref fileName, ref missing, ref readOnly, ref readOnly, ref missing, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing); worddoc.Activate(); object bmMahalle = "Mahalle"; worddoc.Bookmarks.get_Item(ref bmMahalle).Range.Text = _mahalle; object bmAdSoyad = "AdSoyad"; worddoc.Bookmarks.get_Item(ref bmAdSoyad).Range.Text = _isim + " " + _soyisim; object bmAnneAdi = "AnaAdi"; worddoc.Bookmarks.get_Item(ref bmAnneAdi).Range.Text = _anneAdi; object bmBabaAdi = "BabaAdi"; worddoc.Bookmarks.get_Item(ref bmBabaAdi).Range.Text = _babaAdi; object bmBasvuruTarihi = "BasvuruTarihi"; worddoc.Bookmarks.get_Item(ref bmBasvuruTarihi).Range.Text = DateTime.Now.ToString("dd/MM/yyyy"); object bmCinsiyet = "Cinsiyeti"; worddoc.Bookmarks.get_Item(ref bmCinsiyet).Range.Text = _cinsiyet; object bmDogumTarihi = "DogumTarihi"; worddoc.Bookmarks.get_Item(ref bmDogumTarihi).Range.Text = _dogumTarihi; object bmTcKimlikNo = "Tc"; worddoc.Bookmarks.get_Item(ref bmTcKimlikNo).Range.Text = c.tc; object bmIl = "Ili"; worddoc.Bookmarks.get_Item(ref bmIl).Range.Text = _il.ToUpper(); object bmIlce = "Ilce"; worddoc.Bookmarks.get_Item(ref bmIlce).Range.Text = _ilce.ToUpper(); } else { // loglanacak ... // belirtilen yolda dosya yok.. } }
private void PersonToForm(Ciftci person) { txtNameSurname.Text = person.NameSurname; txtFatherName.Text = person.FatherName; txtMotherName.Text = person.MotherName; txtBirthday.Text = person.Birthday; txtYearOfDeath.Text = person.DateOfDeath; comboBoxGender.Text = person.Gender; comboBoxMaritalStatus.Text = person.MaritalStatus; txtMobilePhone.Text = person.MobilePhone; txtHomePhone.Text = person.HomePhone; txtEmail.Text = person.Email; txtCity.Text = person.City; txtTown.Text = person.Town; comboBoxVillage.Text = person.Village; txtNote.Text = person.Not; }
private static void InsertCiftcilerToDb() { //insert ciftciler to db string people = File.ReadAllText(@"C:\Users\caglar\Google Drive\YesilyurtProjects\Archive\Yesilyurt.UI.2021\bin\Debug\Backup\People.json"); var liste = DeserializeObject <Person>(people); List <Ciftci> ciftciler = new List <Ciftci>(); foreach (var item in liste) { Ciftci ciftci = new Ciftci(); ciftci.TcKimlikNo = item.TcKimlikNo; ciftci.NameSurname = item.NameSurname; ciftci.FatherName = item.FatherName; ciftci.MotherName = item.MotherName; ciftci.Birthday = item.Birthday.ToString(); ciftci.DateOfDeath = item.DateOfDeath.ToString(); ciftci.Gender = item.Gender; ciftci.MaritalStatus = item.MaritalStatus; ciftci.MobilePhone = item.MobilePhone; ciftci.HomePhone = item.HomePhone; ciftci.Email = item.Email; ciftci.City = item.City; ciftci.Town = item.Town; ciftci.Village = item.Village; //ciftci.Note = item.Note; ciftciler.Add(ciftci); } CiftciDal ciftciDal = new CiftciDal(); foreach (var _ciftci in ciftciler) { try { int result = ciftciDal.Add(_ciftci); Console.WriteLine($"{result} Row efected {_ciftci.TcKimlikNo} {_ciftci.NameSurname} {_ciftci.Village}"); } catch (Exception exception) { Console.WriteLine(exception.Message); Console.ReadLine(); } } Console.WriteLine("Bitti...."); Console.ReadLine(); }
public Ciftci IsletmeBilgileriGetir(Ciftci ciftci, Entities.Kullanici kullanici) { Ciftci c = new Ciftci(); if (!string.IsNullOrEmpty(ciftci.tc)) { DialogResult soru = MessageBox.Show("Bilgileri forma kaydetmek ister misiniz?", "Soru", MessageBoxButtons.YesNo, MessageBoxIcon.Question); bool formAcilsinmi = soru == DialogResult.Yes ? true : false; driverNvi = new ChromeDriver(); c = selenium.IsletmeBilgileri(driverNvi, ciftci, kullanici, formAcilsinmi); driverNvi.Quit(); } else { MessageBox.Show("Tc numarası giriniz."); } return(c); }
private void btnDelete_Click(object sender, EventArgs e) { if (_activeCiftci != null) { DialogResult dr = Utilities.Mesaj.MessageBoxQuestion($"{_activeCiftci.TcKimlikNo} tc nolu {_activeCiftci.NameSurname} isimli kaydı silmek istiyor musunuz?"); if (dr == DialogResult.Yes) { int result = _ciftcilerManager.Delete(_activeCiftci); _activeCiftci = null; dgwList.DataSource = _ciftcilerManager.GetAll(); Utilities.Mesaj.MessageBoxInformation("Silme işlemi başarılı"); } } else { Utilities.Mesaj.MessageBoxWarning("Listeden çiftçi seçiniz."); } }
private void CiftcininBilgileriniYaz(Ciftci ciftci) { lblId.Text = ciftci.Id.ToString(); txtAnneAdi.Text = ciftci.AnneAdi; txtBabaAdi.Text = ciftci.BabaAdi; txtCepTelefonu.Text = ciftci.CepTelefon; txtCinsiyet.Text = ciftci.Cinsiyet; txtDogumTarihi.Text = ciftci.DogumTarihi.ToString(); txtEmail.Text = ciftci.Email; txtEvTelefonu.Text = ciftci.EvTelefon; txtil.Text = ciftci.Il; txtilçe.Text = ciftci.Ilce; txtIsim.Text = ciftci.Ad; txtMedeniDurum.Text = ciftci.MedeniDurum; txtOlumTarihi.Text = ciftci.OlumTarihi; txtSoyisim.Text = ciftci.Soyad; txtTcNo.Text = ciftci.TcKimlikNo; comboboxMahalleKoy.Text = ciftci.KoyMahalle; }
private void BtnNvi_Click(object sender, EventArgs e) { try { Ciftci ciftci = selenium.IsletmeBilgileriGetir(seleniumTbsCreateCiftci(), _kullanici); txtIsim.Text = ciftci.isim; txtSoyisim.Text = ciftci.soyisim; cmbMahalle.Text = ciftci.mahalle; txtTelefon.Text = ""; richtxtAciklama.Text = ""; txtDilekceNo.Text = string.Empty; txtTarih.Text = DateTime.Today.ToShortDateString(); checkbxYeniKayit.Checked = false; } catch (Exception exception) { Logger.LogTryCatch.TryCatch(exception, "selenium"); } }
private Ciftci UpdatedCiftci() { Entity.Ciftci updatedCiftci = new Ciftci(); updatedCiftci.AnneAdi = txtAnneAdi.Text; updatedCiftci.BabaAdi = txtBabaAdi.Text; updatedCiftci.CepTelefon = txtCepTelefonu.Text; updatedCiftci.Cinsiyet = txtCinsiyet.Text; updatedCiftci.DogumTarihi = Convert.ToDateTime(txtDogumTarihi.Text); updatedCiftci.Email = txtEmail.Text; updatedCiftci.EvTelefon = txtEvTelefonu.Text; updatedCiftci.Id = _ciftci.Id; updatedCiftci.Il = txtil.Text; updatedCiftci.Ilce = txtilçe.Text; updatedCiftci.KoyMahalle = comboboxMahalleKoy.Text; updatedCiftci.MedeniDurum = txtMedeniDurum.Text; updatedCiftci.Ad = txtIsim.Text; updatedCiftci.Soyad = txtSoyisim.Text; updatedCiftci.TcKimlikNo = txtTcNo.Text; return(updatedCiftci); }
private void BtnToFks_Click(object sender, EventArgs e) { Ciftci ciftci = updateCreateCiftci(); if (_kullanici.kullaniciadi != "caglar") { if (cmbListeSec.SelectedIndex == 1) { string mesaj = "2019 yılı FKS kayıtları başlamamıştır."; Business.MesajKutusu.warning(mesaj); } else if (cmbListeSec.SelectedIndex == 0) { string mesaj = "Yetkili değilsiniz."; Business.MesajKutusu.warning(mesaj); } } else { if (cmbListeSec.SelectedIndex == 0) { ciftciService.Save(ciftci, "DILEKCE2018"); //bll.Save(updateCreateCiftci(), "DILEKCE2018"); cmbListeSec.SelectedIndex = 2; } else if (cmbListeSec.SelectedIndex == 1)//liste2019 seçili iken { ciftci.dilekceno = listeManager.Fks2019EnSonNumara(); ciftci.aciklama = string.Empty; ciftciService.SaveFks2019(ciftci); //bll.Save(updateCreateCiftci(), "DILEKCE2019"); cmbListeSec.SelectedIndex = 4; } else if (cmbListeSec.SelectedIndex == 2) { string mesaj = "Ekleme ÇKS 2018 listesi üzerinden yapınız."; cmbListeSec.SelectedIndex = 0; Business.MesajKutusu.warning(mesaj); } } }
private void BtnAra_Click(object sender, EventArgs e) { int secenek = cmbListeSec.SelectedIndex; string listeIsmi = ""; switch (secenek) { case 0: listeIsmi = "liste2018"; break; case 1: listeIsmi = "liste2019"; break; case 2: listeIsmi = "DILEKCE2018"; break; case 3: listeIsmi = "liste2020"; break; case 4: listeIsmi = "DILEKCE2019"; break; default: break; } string tc = txtTc.Text; //dgwListe.DataSource = bll.Search(seleniumTbsCreateCiftci(), listeIsmi); Ciftci c = seleniumTbsCreateCiftci(); dgwListe.DataSource = ciftciService.Search(c.tc, listeIsmi); Temizle(); txtTc.Text = tc; }
private void UpdateIslemi() { Ciftci updatedCiftci = UpdatedCiftci(); try { bll.Update(updatedCiftci); } catch (Exception exception) { HelpClass.MessageBoxOperation.MessageBoxError(exception.Message); } //anaformu ekrana getirip güncel kaydı görmek istiyoruz.. Form anasayfa = Application.OpenForms["Form1"]; TextBox textbox = (TextBox)anasayfa.Controls["txtTcNumarasi"]; textbox.Text = ""; textbox.Text = updatedCiftci.TcKimlikNo; Label lblToplamKisi = (Label)anasayfa.Controls["lblToplamKisi"]; DataGridView dataGridViewListe = (DataGridView)anasayfa.Controls["dataGridViewListe"]; lblToplamKisi.Text = $"Çiftçi listesi, toplam {dataGridViewListe.RowCount} adet çiftçi kayıtlıdır."; }
public Cks2021AddForm(Ciftci isletmeInfo) { InitializeComponent(); isletme = isletmeInfo; bll = new Cks2021Bll(); }
public Ciftci IsletmeBilgileri(IWebDriver driver, Ciftci c, Entities.Kullanici kullanici, bool formAcılsınmı) { //parolayı parola database içinden değil de kullanıcı database içerisinden alıyoruz. //because of that those cods are canceled. //string[] gelenler = listeyebak("tbs"); //string kullaniciadi = gelenler[0]; //string parola = gelenler[1]; TbsGiris(driver, kullanici); driver.Url = "http://tbsapp1.tarim.gov.tr/Modules/TBSSystem/PersonSearch.aspx"; IWebElement TcNo = driver.FindElement(By.Id("ctl00_ctl00_bodyCPH_ContentPlaceHolder1_edtIdNo")); TcNo.Click(); TcNo.SendKeys(c.tc); IWebElement Click = driver.FindElement(By.Name("ctl00$ctl00$bodyCPH$ContentPlaceHolder1$btnMernis")); Click.Click(); TcKontrol: IWebElement Isim = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_edtName")); if (Isim.Text == "") { goto TcKontrol; } IWebElement Soyisim = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_edtSurname")); IWebElement Mahalle = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_lblCiltAdi")); IWebElement Cinsiyet = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_txtGender")); IWebElement BabaAdi = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_edtFatherName")); IWebElement AnneAdi = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_edtMotherName")); IWebElement DogumTarihi = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_edtBirthdate")); IWebElement DogumYeri = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_edtDogumYeri")); IWebElement MedeniDurum = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_txtMaritalStatus")); IWebElement Il = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_lblIl")); IWebElement Ilce = driver.FindElement(By.Id("bodyCPH_ContentPlaceHolder1_lblIlce")); Ciftci ciftci = new Ciftci(); if (!string.IsNullOrEmpty(Isim.Text) && !string.IsNullOrEmpty(Soyisim.Text)) { string _isim, _soyisim, _mahalle, _cinsiyet, _babaAdi, _anneAdi, _dogumTarihi, _dogumYeri, _medeniDurumu, _il, _ilce; _isim = Isim.Text; _soyisim = Soyisim.Text; _mahalle = Mahalle.Text; _cinsiyet = Cinsiyet.Text; _babaAdi = BabaAdi.Text; _anneAdi = AnneAdi.Text; _dogumTarihi = DogumTarihi.Text; _dogumYeri = DogumYeri.Text; _medeniDurumu = MedeniDurum.Text; _il = Il.Text; _ilce = Ilce.Text; ciftci.isim = _isim; ciftci.soyisim = _soyisim; ciftci.mahalle = _mahalle; if (formAcılsınmı) { KayitFormuDoldur(c, _isim, _soyisim, _mahalle, _cinsiyet, _babaAdi, _anneAdi, _dogumTarihi, _il, _ilce); BilgiPaylasimDoldur(_isim, _soyisim, _mahalle); ZiraiDilekceDoldur(_isim, _soyisim, _mahalle, c.tc); } } else { bekle(); } return(ciftci); }
public Cks2020Kaydet(Ciftci isletmeInfo) { InitializeComponent(); isletme = isletmeInfo; bll = new Cks2020Bll(); }
public CiftciGuncelle(Ciftci ciftci) { InitializeComponent(); _ciftci = ciftci; bll = new CiftcilerBll(); }