示例#1
0
        static void Main(string[] args)
        {
            ZbiorDanych con = new ZbiorDanych();
            int a = 0;
            do
            {
                Console.WriteLine("1-dodaj");
                Console.WriteLine("2-update");
                Console.WriteLine("3-delete");
                Console.WriteLine("4-showAll");
                Console.WriteLine("5-exit");
                a=Convert.ToInt32( Console.ReadLine());
                switch (a)
                {
                    case 1:
                        Adres adr= new Adres();
                        adr.miasto = Console.ReadLine();
                        adr.firma = new Firma();
                        con.Zapisz(adr);
                        break;
                    case 2:
                        break;
                    case 4:
                        var lis= (con as IZbiorAdresow).Wczytaj();
                        foreach (var i in lis) Console.WriteLine(i.miasto);
                        break;
                }

            }
            while (a != 5);
        }
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Adres adres = db.Adres.Find(id);

            if (adres == null)
            {
                return(HttpNotFound());
            }
            return(View(adres));
        }
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Adres adres = db.Adres.Find(id);

            if (adres == null)
            {
                return(Redirect("/UzytkownikHome/Index"));
            }
            return(View(adres));
        }
示例#4
0
        public void CorrecAdresModel()
        {
            var adres = new Adres()
            {
                miasto       = "Warszawa",
                ulica        = "Słowackiego",
                nrBloku      = "41D",
                nrMieszkania = "56",
                kodPocztowy  = "90-209"
            };
            var result = TestModelHelper.Validate(adres);

            Assert.AreEqual(0, result.Count);
        }
示例#5
0
        public ActionResult Create([Bind(Include = "AdresId,Miasto,Ulica,Numer,KodPocztowy")] Adres adres)
        {
            if (ModelState.IsValid)
            {
                db.Adres.Add(adres);
                db.Profil.Where(p => p.NazwaUzytkownika.Equals(System.Web.HttpContext.Current.User.Identity.Name)).First().Adresy.Add(adres);


                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(adres));
        }
示例#6
0
        // GET: Adres/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Adres adres = await db.Adreses.FindAsync(id);

            if (adres == null)
            {
                return(HttpNotFound());
            }
            return(View(adres));
        }
示例#7
0
 public ActionResult SilelimMi(int?adresId)
 {
     if (adresId != null)
     {
         try
         {
             Adres adres = _adresService.Get((int)adresId);
             _adresService.Delete(adres);
         }
         catch (Exception)
         {
         }
     }
     return(Redirect("/Home/HomePage"));
 }
示例#8
0
        public static void CompareData(Adres saved, Adres fromDb)
        {
            Assert.IsTrue((saved != null && fromDb != null) || (saved == null && fromDb == null)
                , "Adres zapisany lub z bazy jest nullem, a 2 nie.");

            AreEqual(saved.Powiat, fromDb.Powiat, "Powiat");
            AreEqual(saved.Kod, fromDb.Kod, "Kod");
            AreEqual(saved.Gus, fromDb.Gus, "Gus");
            AreEqual(saved.Kraj, fromDb.Kraj, "Kraj");
            AreEqual(saved.Ulica, fromDb.Ulica, "Ulica");
            AreEqual(saved.Gmina, fromDb.Gmina, "Gmina");
            AreEqual(saved.Wojewodztwo, fromDb.Wojewodztwo, "Wojewodztwo");
            AreEqual(saved.Poczta, fromDb.Poczta, "Poczta");
            AreEqual(saved.Miejscowosc, fromDb.Miejscowosc, "Miejscowosc");
        }
示例#9
0
        // GET: Adres/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Adres adres = _repo.PobierzAdres((int)id);

            if (adres == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Kod_pocztowy = _repo.Pobierz_dostepne_kody_pocztowe();
            return(View(adres));
        }
示例#10
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Adres adres = db.Adres.Find(id);

            if (adres == null)
            {
                return(Redirect("/UzytkownikHome/Index"));
            }
            // ViewBag.id_uzytkownik = new SelectList(db.Uzytkownik, "Id", "imie", adres.id_uzytkownik);
            return(View(adres));
        }
示例#11
0
        public static Adres ConvertToAders(string record)
        {
            Adres address = null;
            var   split   = record.Split(';');

            if (split.Length > 2)
            {
                address           = new Adres();
                address.Camera    = split[0];
                address.Id        = SplitCamera(address.Camera);
                address.Latitude  = split[1];
                address.Longitude = split[2];
            }
            return(address);
        }
示例#12
0
        // GET: Adres/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Adres adres = await db.Adres.FindAsync(id);

            if (adres == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CihazId = new SelectList(db.Database.SqlQuery <Fttx_Orm.Models.Cihaz>("select * from Cihaz where CihazId not in (select CihazId from Adrers where Durum=1) and Durum=1").ToList(), "CihazId", "CihazName", adres.CihazId);

            return(View(adres));
        }
        public async Task <IActionResult> Delete(int?id)
        {
            if (id != null)
            {
                Adres adres = await _db.Adres.FirstOrDefaultAsync(p => p.Id == id);

                if (adres != null)
                {
                    _db.Adres.Remove(adres);
                    await _db.SaveChangesAsync();

                    return(RedirectToAction("Index"));
                }
            }
            return(NotFound());
        }
示例#14
0
        public ActionResult Edit(Adres adres)
        {
            if (!ModelState.IsValid)
            {
                return(View("Edit", adres));
            }
            Adres editAdres = context.FindAdresById(adres.adresId);

            editAdres.kodPocztowy  = adres.kodPocztowy;
            editAdres.miasto       = adres.miasto;
            editAdres.nrBloku      = adres.nrBloku;
            editAdres.nrMieszkania = adres.nrMieszkania;
            editAdres.ulica        = adres.ulica;
            context.SaveChanges();
            return(RedirectToAction("All", "Person"));
        }
示例#15
0
        private void UpdateAdres(Adres adres)
        {
            if (adres == null)
            {
                return;
            }

            adres.WojewodztwoSpecified = !IsDefaultValue(adres.Wojewodztwo);
            adres.PowiatSpecified      = !IsDefaultValue(adres.Powiat);
            adres.GminaSpecified       = !IsDefaultValue(adres.Gmina);
            adres.UlicaSpecified       = !IsDefaultValue(adres.Ulica);
            adres.NrDomuSpecified      = !IsDefaultValue(adres.NrDomu);
            adres.NrLokaluSpecified    = !IsDefaultValue(adres.NrLokalu);
            adres.KodPocztowySpecified = !IsDefaultValue(adres.KodPocztowy);
            adres.PocztaSpecified      = !IsDefaultValue(adres.Poczta);
        }
示例#16
0
        protected void btnKurye_Click(object sender, EventArgs e)
        {
            Kisi       Kisi       = new Kisi();
            Adres      Adres      = new Adres();
            KuryeCagir KuryeCagir = new KuryeCagir();
            Il         Il         = new Il();
            Ilce       Ilce       = new Ilce();

            try
            {
                var il   = ddlKuryeIl.SelectedIndex;
                var ilce = ddlKuryeIlce.SelectedItem.Text.ToString();
                Il   = db.Iller.Find(il);
                Ilce = (from i in db.Iller
                        join ie in db.Ilceler on i.Id equals ie.IlId
                        where ie.IlId == il && ie.Ad == ilce
                        select ie).SingleOrDefault();
                Adres.IlId     = il;
                Adres.IlceId   = Ilce.Id;
                Adres.Mahalle  = tbKuryeMah.Text;
                Adres.Sokak    = tbKuryeSok.Text;
                Adres.No       = tbKuryeNo.Text;
                Adres.Apartman = tbKuryeApt.Text;
                db.Adresler.Add(Adres);

                Kisi.AdresId = Adres.Id;
                Kisi.Ad      = tbKuryeAd.Text;
                Kisi.Soyad   = tbKuryeSoyad.Text;
                Kisi.Tel     = tbKuryeTel.Text;
                db.Kisiler.Add(Kisi);

                Random rndm = new Random();
                int    kid  = rndm.Next(1, 6);

                KuryeCagir.AdresId   = Adres.Id;
                KuryeCagir.KuryeciId = kid;
                db.KuryeCagirlar.Add(KuryeCagir);

                db.SaveChanges();
                lblkcSonuc.Text = "Kuryeniz kısa bir süre içinde gönderilecektir.";
            }
            catch (Exception)
            {
                lblkcSonuc.Text = "İşleminiz gerçekleştirilemedi.";
            }
            clearKurye();
        }
示例#17
0
        private void BtnGüncelle_Click(object sender, EventArgs e)
        {
            List <Adres> adreses = new List <Adres>();
            Adres        adres1  = new Adres();

            _manken.Ad       = txtName.Text;
            _manken.Soyad    = txtSurname.Text;
            adres1.AcikAdres = txtAdres.Text;
            adres1.Sehir     = txtSehir.Text;
            adres1.Ulke      = cmbUlke.Text;
            adreses.Add(adres1);
            _manken.Adres   = adreses;
            _manken.Telefon = new List <string>()
            {
                txtTel1.Text, txtTel2.Text
            };
            _manken.KategoriID      = Convert.ToInt32(cmbKategori.Text);
            _manken.AyakkabiNo      = decimal.Parse(cbAyakkabıNo.Text);
            _manken.Beden           = short.Parse(cbBeden.Text);
            _manken.Kilo            = nmKilo.Value;
            _manken.SacRengi        = cbSacRengi.Text;
            _manken.GözRengi        = CbGözRengi.Text;
            _manken.AKtifMi         = Convert.ToBoolean(comboBox1.SelectedItem);
            _manken.SehirDisiDurumu = chSehırDısıEvet.Checked == true ? true : false;
            _manken.Ehliyet         = chEhliyetEvet.Checked == true ? true : false;
            _manken.Dil             = new List <string>()
            {
                txtLanguage.Text, txtLanguage2.Text, txtLanguage3.Text
            };
            _manken.Ozellik = txtÖzellik.Text;
            if (btnGüncelle.Text == "Güncelle")
            {
                mankenBLL = new MankenBLL();
                int result = mankenBLL.MankenGuncelle(_manken);
                IslemSonucu(result, "Güncelleme");
                frmMankenListele frm = this.Owner as frmMankenListele;
                frm.Refreshh();
            }
            else
            {
                mankenBLL = new MankenBLL();
                int result = mankenBLL.MankenEkle(_manken, txtmail.Text, txtsifre.Text);
                IslemSonucu(result, "Ekleme");
            }

            this.Close();
        }
示例#18
0
        // GET: Adres/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Adres adres = db.Adres.Where(x => x.Id == id).Include(x => x.Type).First();

            ViewBag.Types = db.AdresTypes.Select(a => new SelectListItem {
                Value = a.Id.ToString(), Text = a.Name,
            }).ToList();
            if (adres == null)
            {
                return(HttpNotFound());
            }
            return(View(adres));
        }
示例#19
0
 public bool adres_Delete(Adres usr)
 {
     using (SobelediyeEntities sb = new SobelediyeEntities())
     {
         Adres adres = new Adres();
         adres.AdresID      = usr.AdresID;
         adres.Sokak        = usr.Sokak;
         adres.Mahalle      = usr.Mahalle;
         adres.Koy          = usr.Koy;
         adres.Tarif        = usr.Tarif;
         adres.Kullanici_ID = usr.Kullanici_ID;
         adres.Il_ID        = usr.Il_ID;
         sb.Adres.Remove(adres);
         sb.SaveChanges();
     }
     return(true);
 }
示例#20
0
        private async Task <OrderView> GetSelectList(OrderView order)
        {
            int   CustId = order.CustId;
            Adres adres  = await db.Adreses.FindAsync(order.AdresId);

            sv.Adres = adres.txt;
            Contract contract = await db.Contracts.FindAsync(order.ContractId);

            sv.Contract = contract.Num;
            Person person = await db.Persons.FindAsync(order.PersonId);

            sv.Person         = person.Name;
            sv.SelectAdres    = new SelectList(await db.Adreses.Where(a => a.CustId == CustId | a.CustId == null).OrderBy(x => x.txt).ToListAsync(), "AdresId", "Txt", sv.AdresId);
            sv.SelectContract = new SelectList(await db.Contracts.Where(a => a.CustID == CustId | a.CustID == 0).ToListAsync(), "ContractId", "Num", sv.ContractId);
            sv.SelectPerson   = new SelectList(await personRepo.GetPerson(order.CustId), "PersonId", "Name", sv.PersonId);
            return(sv);
        }
示例#21
0
        public Adres GetAdresById(int adresId)
        {
            try
            {
                using (SqlConnection conn = new SqlConnection(connectie))
                {
                    if (conn.State != ConnectionState.Open)
                    {
                        conn.Open();

                        using (SqlCommand cmd = new SqlCommand())
                        {
                            cmd.CommandText = "SELECT * FROM Adres WHERE AdresId = @adresId;";
                            cmd.Connection  = conn;


                            cmd.Parameters.AddWithValue("@adresId", adresId);

                            using (SqlDataReader reader = cmd.ExecuteReader())
                            {
                                while (reader.Read())
                                {
                                    int    id         = reader.GetInt32(0);
                                    string straat     = reader.GetString(1);
                                    string huisnummer = reader.GetString(2);
                                    string postcode   = reader.GetString(3);
                                    string woonplaats = reader.GetString(4);
                                    string huisemail  = "";
                                    if (!reader.IsDBNull(5))
                                    {
                                        huisemail = reader.GetString(5);
                                    }
                                    Adres adres = new Adres(id, straat, huisnummer, postcode, woonplaats);
                                    return(adres);
                                }
                            }
                        }
                    }
                }
                return(null);
            }
            catch (Exception exception)
            {
                throw new Exception(exception.Message);
            }
        }
示例#22
0
        public ActionResult AdresDuzenle(AdresViewModel model)
        {
            try
            {
                Kisi kisi = _kisiService.Get(model.Adres.KisiID);

                Adres eskiAdres = _adresService.Get(model.Adres.ID);
                eskiAdres.Kisi       = kisi;
                eskiAdres.AdresTanim = model.Adres.AdresTanim;

                _adresService.Update(eskiAdres);
            }
            catch (Exception)
            {
            }
            return(Redirect("/Home/HomePage"));
        }
示例#23
0
        public void TestDisplayByIdMoq()
        {
            Adres adres = new Adres();

            adres.adresId = 5;
            adres.miasto  = "Warszawa";
            Mock <IPersonSharingContext> context = new Mock <IPersonSharingContext>();

            context.Setup(x => x.FindAdresById(2)).Returns(adres);
            var controller = new AdresController(context.Object);

            var result = controller.DisplayById(2) as ViewResult;

            Assert.AreEqual("Display", result.ViewName);
            var resultAdres = (Adres)result.Model;

            Assert.AreEqual("Warszawa", resultAdres.miasto);
        }
示例#24
0
        // GET: Home
        public ActionResult HomePage()
        {
            Kisi admin = new Kisi();

            admin.Ad    = "ibrahim";
            admin.Soyad = "calis";
            admin.yas   = 21;
            Adres ev = new Adres();

            ev.il        = "istanbul";
            ev.ilce      = "bagcilar";
            ev.adresKisi = admin;
            HomePageViewModel newmodel = new HomePageViewModel();

            newmodel.KisiNesnesi  = admin;
            newmodel.AdresNesnesi = ev;
            return(View(newmodel));
        }
示例#25
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Ogrenci[] ogrenciler = new Ogrenci[3];



        Ogrenci ogr = new Ogrenci();

        ogr.Ogno    = 9;
        ogr.Adsoyad = "tuncay salı";
        Adres adres = new Adres();

        adres.Cadde = "konak cad";
        adres.Ilce  = "yıldırım";
        adres.Il    = "bursa";
        ogr.Adres   = adres;
        Response.Write(ogr.bilgial());
    }
示例#26
0
        public async Task <int> CreateAdres(AdresModel model)
        {
            var adres = new Adres
            {
                AdresRegel1          = model.AdresRegel1,
                AdresRegel2          = model.AdresRegel2,
                Gemeente             = model.Gemeente,
                Huisnummer           = model.Huisnummer,
                HuisnummerToevoeging = model.HuisnummerToevoeging,
                Land     = model.Land,
                PostCode = model.PostCode,
                Straat   = model.Straat
            };

            Db.Adressen.Add(adres);
            await Db.SaveChangesAsync();

            return(adres.Id);
        }
        public ActionResult AddPracownikAdres([Bind("PracownikId,Imie,Nazwisko,Email,Telefon,AdresId,Miejscowosc,Ulica,NrDomu,NrLokalu,KodPocztowy")] AdresVW obj)
        {
            try
            {
                int   lastestAdrId;
                Adres a = new Adres();
                a.Miejscowosc = obj.Miejscowosc;
                a.Ulica       = obj.Ulica;
                a.NrDomu      = obj.NrDomu;
                a.NrLokalu    = obj.NrLokalu;
                a.KodPocztowy = obj.KodPocztowy;
                var adress = _context.Adres.Where(m => m.Miejscowosc == obj.Miejscowosc && m.Ulica == obj.Ulica && m.NrDomu == obj.NrDomu && m.NrLokalu == obj.NrLokalu).FirstOrDefault();

                if (adress == null)
                {
                    _context.Adres.Add(a);
                    _context.SaveChanges();
                    lastestAdrId = a.AdresId;
                }
                else
                {
                    lastestAdrId = adress.AdresId;
                    //_context.Adres.Update(a);
                    //_context.SaveChanges();
                }

                Pracownik p = new Pracownik();
                p.Imie     = obj.Imie;
                p.Nazwisko = obj.Nazwisko;
                p.Email    = obj.Email;
                p.Telefon  = obj.Telefon;
                p.AdresId  = lastestAdrId;

                _context.Pracownik.Add(p);
                _context.SaveChanges();
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists see your system administrator.");
            }
            return(RedirectToAction(nameof(Index)));
            //return View(obj);
        }
示例#28
0
        public ActionResult YeniAdresEkle(Adres k)
        {
            //yeni adres eklenir
            string            email       = HttpContext.Session.GetString("e-Mail");
            string            kullaniciAd = HttpContext.Session.GetString("username");
            ETicaretDbContext tablo       = new ETicaretDbContext();
            int   id = tablo.Kullanicis.FirstOrDefault(x => x.EMail == email).Id;
            Adres a  = new Adres();

            a.KullaniciId = id;
            a.KullaniciAd = kullaniciAd;
            a.YeniAdres   = k.YeniAdres;
            a.Telefon     = k.Telefon;
            a.EMail       = k.EMail;
            a.AdresBaslik = k.AdresBaslik;
            tablo.Adres.Add(a);
            tablo.SaveChanges();
            return(Redirect("/Urun/AdresGir?id=" + id));
        }
示例#29
0
        private void materialRaisedButton4_Click(object sender, EventArgs e)//Ekle & Güncelle
        {
            if (!girdiKontrol(seciliTUR))
            {
                this.DialogResult = DialogResult.No;
                log.logEkle("Eksik veriler ile konut ekleme uyarısı!", LOGSEVIYE.uyarı);
                return;
            }


            string adresStr = "";
            string bol      = Global.böl2.ToString();

            adresStr += comboBox1.SelectedValue + bol;
            adresStr += comboBox2.SelectedValue + bol;
            adresStr += comboBox3.SelectedValue + bol;
            adresStr += comboBox4.SelectedValue;
            Adres adres = new Adres(adresStr);

            int yedekEvID = EmlakID;

            if (seciliTUR == TUR.satılık)//kiralık veya satılık
            {
                ev = new SatılıkEv((int)numericUpDown3.Value, adres, (int)numericUpDown1.Value, EVTIPI.Daire, true, textBox1.Text, (int)numericUpDown2.Value, (int)numericUpDown6.Value, dateTimePicker1.Value, textBox2.Text);
            }
            else
            {
                ev = new KiralıkEv((int)numericUpDown3.Value, adres, (int)numericUpDown1.Value, EVTIPI.Daire, true, textBox1.Text, (int)numericUpDown4.Value, 0, (int)numericUpDown6.Value, dateTimePicker1.Value, textBox2.Text);
            }

            if (aktifEtür == EKLEMETURU.yeniekle)
            {
                MessageBox.Show("Konut Başarıyla Eklendi!", "Eklendi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("Konut Başarıyla Güncellendi!", "Güncellendi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

            ev.EmlakNo        = yedekEvID;
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
示例#30
0
        public void TestEditConfAdresMoq()
        {
            Adres adres = new Adres();

            adres.miasto = "Gdańsk";
            Mock <IPersonSharingContext> context = new Mock <IPersonSharingContext>();

            context.Setup(x => x.FindAdresById(2)).Returns(adres);
            context.Setup(s => s.SaveChanges()).Returns(0);
            var controller = new AdresController(context.Object);

            adres.miasto      = "Warszawa";
            adres.kodPocztowy = "80-292";
            adres.adresId     = 2;
            var result = controller.Edit(adres) as RedirectToRouteResult;

            Assert.AreEqual("All", result.RouteValues["Action"]);
            Assert.AreEqual("Person", result.RouteValues["Controller"]);
        }
示例#31
0
        public KlantBuilder SetDummy()
        {
            Id             = DateTime.Now.GetHashCode();
            Voornaam       = "Dummy";
            Achternaam     = "van Dummy";
            Telefoonnummer = "0612345678";
            Email          = "*****@*****.**";
            Adres          = new Adres()
            {
                Id         = 1,
                Huisnummer = "12",
                Land       = "Nederland",
                Plaats     = "Utrecht",
                Postcode   = "3511 BS",
                Straatnaam = "St Jacobsstraat"
            };

            return(this);
        }
示例#32
0
        public async Task <IActionResult> AddOrEdit([Bind("AdresId,Miejscowosc,Ulica,NrDomu,NrLokalu,KodPocztowy")] Adres adres, string returnUrl)
        {
            if (ModelState.IsValid)
            {
                if (adres.AdresId == 0)
                {
                    _context.Add(adres);
                }
                else
                {
                    _context.Update(adres);
                }
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
                //return Redirect(returnUrl);
            }
            return(View(adres));
        }
示例#33
0
        public static void AdresDisplayTest(Adres a, string prefix, WebForm currentWebForm)
        {
            LabelTester PowiatLbl = new LabelTester(GetCtrlId(prefix,"Powiat"), currentWebForm);
            LabelTester KodLbl = new LabelTester(GetCtrlId(prefix,"Kod"), currentWebForm);
            LabelTester GusLbl = new LabelTester(GetCtrlId(prefix,"Gus"), currentWebForm);
            LabelTester KrajLbl = new LabelTester(GetCtrlId(prefix,"Kraj"), currentWebForm);
            LabelTester UlicaLbl = new LabelTester(GetCtrlId(prefix,"Ulica"), currentWebForm);
            LabelTester GminaLbl = new LabelTester(GetCtrlId(prefix,"Gmina"), currentWebForm);
            LabelTester WojewodztwoLbl = new LabelTester(GetCtrlId(prefix,"Wojewodztwo"), currentWebForm);
            LabelTester PocztaLbl = new LabelTester(GetCtrlId(prefix,"Poczta"), currentWebForm);
            LabelTester MiejscowoscLbl = new LabelTester(GetCtrlId(prefix,"Miejscowosc"), currentWebForm);

            AreEqual(a.Powiat, PowiatLbl.Text, "Z³y Powiat");
            AreEqual(a.Kod, KodLbl.Text, "Z³y Kod");
            AreEqual(a.Gus, GusLbl.Text, "Z³y Gus");
            AreEqual(a.Kraj, KrajLbl.Text, "Z³y Kraj");
            AreEqual(a.Ulica, UlicaLbl.Text, "Z³y Ulica");
            AreEqual(a.Gmina, GminaLbl.Text, "Z³y Gmina");
            AreEqual(a.Wojewodztwo, WojewodztwoLbl.Text, "Z³y Wojewodztwo");
            AreEqual(a.Poczta, PocztaLbl.Text, "Z³y Poczta");
            AreEqual(a.Miejscowosc, MiejscowoscLbl.Text, "Z³y Miejscowosc");
        }
示例#34
0
        public static void SetData(Adres a, string prefix, WebForm currentWebForm)
        {
            TextBoxTester Powiat = new TextBoxTester(GetCtrlId(prefix, "PowiatEdit"), currentWebForm);
            TextBoxTester Kod = new TextBoxTester(GetCtrlId(prefix, "KodEdit"), currentWebForm);
            TextBoxTester Gus = new TextBoxTester(GetCtrlId(prefix, "GusEdit"), currentWebForm);
            TextBoxTester Kraj = new TextBoxTester(GetCtrlId(prefix, "KrajEdit"), currentWebForm);
            TextBoxTester Ulica = new TextBoxTester(GetCtrlId(prefix, "UlicaEdit"), currentWebForm);
            TextBoxTester Gmina = new TextBoxTester(GetCtrlId(prefix, "GminaEdit"), currentWebForm);
            TextBoxTester Wojewodztwo = new TextBoxTester(GetCtrlId(prefix, "WojewodztwoEdit"), currentWebForm);
            TextBoxTester Poczta = new TextBoxTester(GetCtrlId(prefix, "PocztaEdit"), currentWebForm);
            TextBoxTester Miejscowosc = new TextBoxTester(GetCtrlId(prefix, "MiejscowoscEdit"), currentWebForm);

            Miejscowosc.Text = a.Miejscowosc;
            Powiat.Text = a.Powiat;
            Kod.Text = a.Kod;
            Gus.Text = a.Gus;
            Kraj.Text = a.Kraj;
            Ulica.Text = a.Ulica;
            Gmina.Text = a.Gmina;
            Wojewodztwo.Text = a.Wojewodztwo;
            Poczta.Text = a.Poczta;
        }
示例#35
0
 //konstruktor przyjmuje obiekt, z którym będzie pracował
 public AdresForm(Adres _adres)
 {
     this.Adres = _adres;
     InitializeComponent();
 }