Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     using (PoslovniKlubBL temp = new PoslovniKlubBL())
     {
         string jmbg = Request.QueryString["JMBG"];
         korisnici user = new korisnici();
         user = temp.GetKorisnik(jmbg);
         int id = user.gradID.Value;
         string mjesto = temp.GetGradByID(id);
         string adresa=user.Adresa + ", " + mjesto;
         string telefoni = user.Telefon + "; " + user.Telefon2 + "; " + user.Mobitel;
         txtKorisnik.Text = user.Prezime + " " + user.Ime + "; " + user.JMBG + "; " + adresa + "; " + telefoni + "; " + user.email + "; " + user.KomunikPutem;
     }
 }
Beispiel #2
0
 protected void btnDeleteAdd_Click(object sender, EventArgs e)
 {
     using (PoslovniKlubBL temp = new PoslovniKlubBL())
     {
         int userID = temp.GetKorisnik(txtJMBG.Text).KorisnikID; //temp.GetUserBySpBr(row.Cells[0].Text);
         string url = "BrisanjeOglasa.aspx?" + "&SporazumBroj=" + userID;
         StringBuilder sb = new StringBuilder();
         sb.Append("<script type = 'text/javascript'>");
         sb.Append("window.open('");
         sb.Append(url);
         sb.Append("');");
         sb.Append("</script>");
         ClientScript.RegisterStartupScript(this.GetType(), "script", sb.ToString());
     }
 }
Beispiel #3
0
        protected void btnNewAdd_Click(object sender, EventArgs e)
        {
            using (PoslovniKlubBL temp = new PoslovniKlubBL())
            {
                int userID = temp.GetKorisnik(txtJMBG.Text).KorisnikID; //temp.GetUserBySpBr(row.Cells[0].Text);
                string user = txtPrezime.Text + " " + txtIme.Text + "; " + txtJMBG.Text + "; " + txtTelefon.Text + "; " + txtMobitel.Text;
                //Response.Redirect("UnosOglasa.aspx?" + "&SporazumBroj=" + userID + "&korisnik=" + Server.UrlEncode(user)); ovo sam koristio prije uvođenja novog prozora za novi oglas

                string url = "UnosOglasa.aspx?" + "&SporazumBroj=" + userID + "&korisnik=" + Server.UrlEncode(user);
                StringBuilder sb = new StringBuilder();
                sb.Append("<script type = 'text/javascript'>");
                sb.Append("window.open('");
                sb.Append(url);
                sb.Append("');");
                sb.Append("</script>");
                ClientScript.RegisterStartupScript(this.GetType(), "script", sb.ToString());

                //string url = "&SporazumBroj=" + userID + "&korisnik=" + Server.UrlEncode(user);
                //ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "window.open('UnosOglasa.aspx? + url',null, 'height=800,width=600,status=yes,toolbar=yes,menubar=yes,location=yes');",true);
            }
        }
Beispiel #4
0
 protected void btnIzmjena_Click(object sender, EventArgs e)
 {
     using (PoslovniKlubBL temp = new PoslovniKlubBL())
     {
         string jmbg = Request.QueryString["JMBG"];
         korisnici user = new korisnici();
         user = temp.GetKorisnik(jmbg);
         string prezime = user.Prezime;
         string ime = user.Ime;
         string adresa = user.Adresa;
         int mjesto = user.gradID.Value;
         string tel = user.Telefon;
         string tel2 = user.Telefon2;
         string mob = user.Mobitel;
         string email = user.email;
         string kom = user.KomunikPutem;
         string sporBr = user.SporazumBroj;
         //string fili = user.filijala; nema polje filijala u bazi. treba dodati
         Response.Redirect("../Public/Registracija.aspx?" + "&JMBG=" + Server.UrlEncode(jmbg) + "&Prezime=" + Server.UrlEncode(prezime) +
             "&Ime=" + Server.UrlEncode(ime) + "&Adresa=" + Server.UrlEncode(adresa) + "&Opstina=" + mjesto + "&Telefon=" + Server.UrlEncode(tel) +
             "&Telefon2=" + Server.UrlEncode(tel2) + "&Mobitel=" + Server.UrlEncode(mob) + "&Email=" + Server.UrlEncode(email) + "&Komunikacija=" +
             Server.UrlEncode(kom) + "&Sporazum=" + Server.UrlEncode(sporBr));
     }
 }