protected void btnEkle_Click(object sender, EventArgs e)
    {
        string id = kod.getDataCell("Select ogr_id from ogrenci WHERE ogr_no = " + Request.QueryString["no"]);

        string ogrcv = kod.getDataCell("select ogr_cv from ogrenci WHERE ogr_no =" + Request.QueryString["no"]);
        string ogrpp = kod.getDataCell("select ogr_resimi from ogrenci WHERE ogr_no =" + Request.QueryString["no"]);

        kod.komut("UPDATE ogrenci set ogr_ad = '" + txtAd.Text + "' , ogr_no='" + txtOgrNo.Text + "' , ogr_okul='" + txtOkul.Text + "' , ogr_soyad='" + txtSoyadi.Text + "', ogr_bolum='" + txtBolum.Text + "' , ogr_fakulte='" + txtFakulte.Text + "', ogr_not_ort='" + txtNotOrt.Text + "', ogr_tel='" + txtTel.Text + "', ogr_adres='" + txtAdres.Text + "' , ogr_email='" + txtEposta.Text + "' , sicil_no='" + txtOgrSicil.Text + "', ogr_sifre='" + txtSifre.Text + "' , ogr_cv= '" + ogrcv + "', ogr_resimi='" + ogrpp + "' WHERE  ogr_id =" + id);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string TP = kod.getDataCell("SELECT  COUNT(projeId) FROM proje ");

        Tp.InnerText = TP.ToString();

        string MT = kod.getDataCell("SELECT COUNT(makaleAd) FROM makaleler");

        Mt.InnerText = MT.ToString();

        RepeaterProjeler.DataSource = kod.GetDataTable("SELECT Top 20 *  FROM [proje]  ORDER BY projeId DESC");
        RepeaterProjeler.DataBind();

        RepeaterMakaleler.DataSource = kod.GetDataTable("SELECT Top 20 *  FROM [makaleler] ORDER BY makaleId DESC");
        RepeaterMakaleler.DataBind();
    }
    public string urunGorselGetir(int projeId)
    {
        string resimYol = kod.getDataCell("Select Top 1 projeGorselUrlKucuk from projegorsel where projeId=" + projeId);

        if (resimYol == null)
        {
            resimYol = "/img/resim_yok.png";
        }
        return(resimYol);
    }
Пример #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["tur"] == "ogrenci")
        {
            PanelOgrenci.Visible = true;
            string foto = kod.getDataCell("select ogr_resimi from ogrenci WHERE ogr_no =  " + Request.QueryString["no"]);

            if ("0" == foto)
            {
                LabelFotoGuncelle.Visible = true;
            }
            else
            {
                LabelFotoGuncelle.Visible = false;
            }
        }
        else if (Request.QueryString["tur"] == "ogretmen")
        {
            PanelOgretmen.Visible = true;
        }
        else if (Request.QueryString["tur"] == "kurum")
        {
            PanelKurum.Visible = true;

            string logo = kod.getDataCell("select kurum_resim from kurum WHERE kurum_kodu = '" + Request.QueryString["kurumkod"].ToString() + "'");
            if ("0" == logo)
            {
                KurumFotoGuncellePaneli.Visible = true;
            }
            else
            {
                KurumFotoGuncellePaneli.Visible = false;
            }
        }
        else
        {
            PanelHata.Visible = true;
        }
    }
 protected void btnEkle_Click(object sender, EventArgs e)
 {
     try
     {
         string ProjeAd = txtProjeAd.Text, ProjeFiyat = txtProjeFiyat.Text, ProjeBilgi = txtProjeBilgi.Text, altKatId = ddlAlt.SelectedValue.ToString(), EnALtKat = ddlEnAlt.SelectedValue.ToString(), durum = ddlDurum.SelectedValue;
         kod.komut("Insert Into proje (projeAd,projeFiyat,projeBilgi,projeDurum,altKategoriId,altKategorininAltKategori_Id) Values('" + txtProjeAd.Text.Replace("'", "''") + "', '" + ProjeFiyat + "','" + txtProjeBilgi.Text.Replace("'", "''") + "', '" + durum + "', '" + altKatId + "', '" + EnALtKat + "')");
         lblDurum.Visible = true;
         string idAl = kod.getDataCell("Select Top 1 projeId from proje Order BY projeId Desc");
         Response.Redirect("urunFoto.aspx?uId=" + idAl);
     }
     catch
     {
         LblHata.Visible = true;
     }
 }
Пример #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["kullanici"] == null)
        {
            Response.Redirect("giris.aspx");
        }
        else
        {
            if (Request.QueryString["tur"] == "ogrenci")
            {
                PanelOgrenci.Visible = true;
                lblKullanici.Text    = Session["kullanici"].ToString();

                string id = kod.getDataCell("select ogr_id from  ogrenci where  ogr_ad=" + Session["kullanici"].ToString());

                RepeaterAvatarOgrenci.Visible    = true;
                RepeaterAvatarOgrenci.DataSource = kod.GetDataTable("SELECT *  FROM ogrenci where  ogr_no =  " + Request.QueryString["no"]);
                RepeaterAvatarOgrenci.DataBind();
            }
            else if (Request.QueryString["tur"] == "ogretmen")
            {
                PanelOgretmen.Visible             = true;
                lblKullanici.Text                 = Session["kullanici"].ToString();
                RepeaterAvatarOgretmen.Visible    = true;
                RepeaterAvatarOgretmen.DataSource = kod.GetDataTable("SELECT *  FROM hoca where  sicil_no =  " + Request.QueryString["sicil"]);
                RepeaterAvatarOgretmen.DataBind();
                if (Request.QueryString["KurumId"] == null)
                {
                    PanelOgretmen.Visible = true;
                }
                else
                {
                    PanelOgretmen.Visible = false;
                }

                if (Request.QueryString["stajyerId"] == null)
                {
                    PanelOgretmen.Visible = true;
                }
                else
                {
                    PanelOgretmen.Visible = false;
                }
                if (Request.QueryString["ogrId"] == null)
                {
                    PanelOgretmen.Visible = true;
                }
                else
                {
                    PanelOgretmen.Visible = false;
                }
            }

            else if (Request.QueryString["tur"] == "kurum")
            {
                RepeaterAvatarKurum.Visible    = true;
                RepeaterAvatarKurum.DataSource = kod.GetDataTable("SELECT *  FROM KURUM where  kurum_kodu ='" + Request.QueryString["kurumkod"] + "' ");
                RepeaterAvatarKurum.DataBind();

                PanelKurum.Visible = true;
                lblKullanici.Text  = Session["kullanici"].ToString();

                if (Request.QueryString["stajyerId"] == null)
                {
                    PanelKurum.Visible = true;
                }
                else
                {
                    PanelKurum.Visible = false;
                }
            }
            else
            {
                Response.Redirect("giris.aspx");
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //try
        //{
        string StajKayitlimi = kod.getDataCell("select kurum_adi from stajyer WHERE ogr_no =" + Request.QueryString["no"]);

        Label1.Text = StajKayitlimi;

        if (Label1.Text == "")
        {
            PanelStajKaydet.Visible = true;
            Label1.Text             = "Staj Yeri Seçmediniz";
            ButtonStajİptal.Visible = false;
        }
        else
        {
            PanelStajKaydet.Visible = false;
            Label1.Text             = StajKayitlimi;
        }
        //}
        //catch (Exception)
        //{
        //    //Label1.Text = "Kayıt Yok";

        //}

        if (!Page.IsPostBack)
        {
            DataRow dr = kod.GetDataRow("Select * from ogrenci WHERE ogr_no =" + Request.QueryString["no"]);
            txtAd.Text     = dr[1].ToString();
            txtSoyadi.Text = dr[4].ToString();
            txtOgrNo.Text  = dr[2].ToString();
            txtOkul.Text   = dr[3].ToString();
            txtBolum.Text  = dr[5].ToString();

            txtNotOrt.Text = dr[7].ToString();
            txtTel.Text    = dr[8].ToString();

            txtEposta.Text   = dr[11].ToString();
            txtOgrSicil.Text = dr[11].ToString();

            string danismanAd    = kod.getDataCell("select hoca_adi from hoca WHERE sicil_no = '" + dr[11].ToString() + "'");
            string danismanSoyad = kod.getDataCell("select hoca_soyadi from hoca WHERE hoca_adi = '" + danismanAd + "'");

            txtDanısman.Text = danismanAd + " " + danismanSoyad;


            DataTable dt = kod.GetDataTable("SELECT * from kurum");
            DropDownListKurumlar.DataSource     = dt;
            DropDownListKurumlar.DataValueField = "kurum_kodu";
            DropDownListKurumlar.DataTextField  = "kurum_adi";
            DropDownListKurumlar.DataBind();


            LabelKurumKodunuz.Text = DropDownListKurumlar.SelectedItem.Value;
            DataRow kurum = kod.GetDataRow("Select * from kurum WHERE kurum_kodu = '" + LabelKurumKodunuz.Text + "' ");
            LabelKurumTel.Text    = kurum[3].ToString();
            LabelKurumEPosta.Text = kurum[4].ToString();



            DataTable pp = kod.GetDataTable("select ogr_resimi from ogrenci WHERE ogr_no =" + Request.QueryString["no"]);
            RepeaterOgrResim.DataSource = pp;
            RepeaterOgrResim.DataBind();


            DataTable cv = kod.GetDataTable("select ogr_cv from ogrenci WHERE ogr_no =" + Request.QueryString["no"]);
            RepeaterCV.DataSource = cv;
            RepeaterCV.DataBind();
        }
    }