Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     dopingUcretRepeater.DataSource = dopingKtgb.list();
     dopingUcretRepeater.DataBind();
 }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            dopingKategoriBll dkb = new dopingKategoriBll();


            if (!IsPostBack)
            {
                if (Session["unique-site-user"] != null)
                {
                    drpAnasayfa.Items.Clear();
                    drpAramaSonuc.Items.Clear();
                    drpKategoriVitrin.Items.Clear();
                    drpUstSirada.Items.Clear();
                    drpAcil.Items.Clear();
                    drpKucukFoto.Items.Clear();
                    drpKalinYazi.Items.Clear();

                    ListItem lst = new ListItem();
                    lst.Text  = "Seçiniz";
                    lst.Value = "";

                    drpAnasayfa.DataSource     = dkb.list(2, 1, 1);
                    drpAnasayfa.DataTextField  = "deneme";
                    drpAnasayfa.DataValueField = "dopingKategoriId";
                    drpAnasayfa.DataBind();
                    drpAnasayfa.Items.Insert(0, lst);

                    drpAramaSonuc.DataSource     = dkb.list(2, 1, 2);
                    drpAramaSonuc.DataTextField  = "deneme";
                    drpAramaSonuc.DataValueField = "dopingKategoriId";
                    drpAramaSonuc.DataBind();
                    drpAramaSonuc.Items.Insert(0, lst);

                    drpUstSirada.DataSource     = dkb.list(2, 1, 3);
                    drpUstSirada.DataTextField  = "deneme";
                    drpUstSirada.DataValueField = "dopingKategoriId";
                    drpUstSirada.DataBind();
                    drpUstSirada.Items.Insert(0, lst);

                    drpKategoriVitrin.DataSource     = dkb.list(2, 1, 4);
                    drpKategoriVitrin.DataTextField  = "deneme";
                    drpKategoriVitrin.DataValueField = "dopingKategoriId";
                    drpKategoriVitrin.DataBind();
                    drpKategoriVitrin.Items.Insert(0, lst);

                    drpAcil.DataSource     = dkb.list(2, 1, 5);
                    drpAcil.DataTextField  = "deneme";
                    drpAcil.DataValueField = "dopingKategoriId";
                    drpAcil.DataBind();
                    drpAcil.Items.Insert(0, lst);

                    drpKucukFoto.DataSource     = dkb.list(2, 1, 6);
                    drpKucukFoto.DataTextField  = "deneme";
                    drpKucukFoto.DataValueField = "dopingKategoriId";
                    drpKucukFoto.DataBind();
                    drpKucukFoto.Items.Insert(0, lst);

                    drpKalinYazi.DataSource     = dkb.list(2, 1, 7);
                    drpKalinYazi.DataTextField  = "deneme";
                    drpKalinYazi.DataValueField = "dopingKategoriId";
                    drpKalinYazi.DataBind();
                    drpKalinYazi.Items.Insert(0, lst);


                    if (Session["dp"] != null)
                    {
                        JArray objDizi = (JArray)Session["dp"];

                        for (int i = 0; i < objDizi.Count; i++)
                        {
                            if (objDizi[i]["islemId"].ToString() == "1")
                            {
                                drpAnasayfa.SelectedValue = objDizi[i]["secili"].ToString();
                            }
                            if (objDizi[i]["islemId"].ToString() == "2")
                            {
                                drpAramaSonuc.SelectedValue = objDizi[i]["secili"].ToString();
                            }
                            if (objDizi[i]["islemId"].ToString() == "3")
                            {
                                drpKategoriVitrin.SelectedValue = objDizi[i]["secili"].ToString();
                            }
                            if (objDizi[i]["islemId"].ToString() == "4")
                            {
                                drpUstSirada.SelectedValue = objDizi[i]["secili"].ToString();
                            }
                            if (objDizi[i]["islemId"].ToString() == "5")
                            {
                                drpAcil.SelectedValue = objDizi[i]["secili"].ToString();
                            }
                            if (objDizi[i]["islemId"].ToString() == "6")
                            {
                                drpKucukFoto.SelectedValue = objDizi[i]["secili"].ToString();
                            }
                            if (objDizi[i]["islemId"].ToString() == "7")
                            {
                                drpKalinYazi.SelectedValue = objDizi[i]["secili"].ToString();
                            }
                        }
                    }
                }
                else
                {
                    Response.Redirect("~/giris-yap.aspx");
                }
            }
        }