protected void btnGuncelleTable_Click(object sender, EventArgs e)
        {
            try
            {
                Button btn = (Button)sender;
                int    ID  = int.Parse(btn.CommandArgument);
                lblInfo2.Text = ID.ToString();

                Slider   slider         = _sliderService.Get(ID);
                int      selectLanguage = slider.LanguageID;
                Language language       = (from l in db.Language where l.ID == selectLanguage && l.IsActive == true select l).FirstOrDefault();

                txtBaslik.Text = slider.sliderTitle;
                txtYazi.Text   = slider.SliderWriting;

                if (language.Code == "tr-TR")
                {
                    ddlLanguage.SelectedIndex = 0;
                }
                else
                {
                    ddlLanguage.SelectedIndex = 1;
                }

                if (slider.SliderURL != "")
                {
                    string Image    = slider.SliderURL;
                    string subImage = Image.Substring(9, Convert.ToInt32(Image.Length) - 9);
                    lblInfo.Text       = Image;
                    ImgSlider.ImageUrl = subImage;
                }
                if (slider.IsActive)
                {
                    RadioButtonList1.SelectedIndex = 0;
                }
                else
                {
                    RadioButtonList1.SelectedIndex = 1;
                }
                panelVisible(false, false, true, false);
                Butonvisible(false);
            }
            catch (Exception)
            {
                Uyari("Aradığınız veriye ulaşılamadı", false);
            }
        }
Esempio n. 2
0
 public ActionResult <List <Slider> > Get()
 {
     return(_sliderService.Get());
 }