Пример #1
0
 protected void FVSyf_DataBound(object sender, EventArgs e)
 {
     if (FVSyf.CurrentMode == FormViewMode.Insert)
     {
         ((RadioButtonList)FVSyf.FindControl("RBL1")).SelectedIndex = 0;
     }
 }
Пример #2
0
    protected void FVSyf_DataBound(object sender, EventArgs e)
    {
        Literal        LtrDil = (Literal)FVSyf.FindControl("LtrDiller");
        Snlg_DBConnect vt     = new Snlg_DBConnect(true);
        SqlDataReader  Sdr    = vt.DBReaderOlustur("SELECT * FROM snlg_V1.TblDiller WHERE Aktif=1", CommandType.Text);

        vt.Ac();
        while (Sdr.Read())
        {
            LtrDil.Text += "<a href='?dil=" + Sdr["DId"].ToString() + "'><img src='/admin/common/images/flags/" + Sdr["DId"].ToString() + ".png' /></a>";
        }
        vt.Kapat();
    }
    protected void SDSSyf_Updating(object sender, SqlDataSourceCommandEventArgs e)
    {
        if (!YetkiKontrol(pageName + "-Update"))
        {
            e.Cancel = true;
            return;
        }
        DropDownList DDLUst = (DropDownList)FVSyf.FindControl("DDLUst");

        if (!string.IsNullOrEmpty(DDLUst.SelectedValue))
        {
            e.Command.Parameters["@UstID"].Value = DDLUst.SelectedValue;
        }
    }
Пример #4
0
    protected void FVSyf_DataBound(object sender, EventArgs e)
    {
        DropDownList DDLLinks = (DropDownList)FVSyf.FindControl("DDLLinks");
        DropDownList DDLUst   = (DropDownList)FVSyf.FindControl("DDLUst");

        try
        {
            DDLUst.Items.Clear();
            DDLUst.Items.Add(new ListItem("Ana Kategori Olsun", ""));
            DDLDoldur(DTMenuler.Select("UstId IS NULL", "Sira"), null, DDLUst);
        }
        catch { }
        DataRow satir = DTMenuler.Rows.Find(editedMenuID);

        try
        {
            if (satir == null || string.IsNullOrEmpty(satir["UstId"].ToString()))
            {
                DDLUst.Items.FindByValue("").Selected = true;
            }
            else
            {
                DDLUst.Items.FindByValue(satir["UstId"].ToString()).Selected = true;
            }
        }
        catch { }

        Snlg_DBConnect vt = new Snlg_DBConnect(true);

        Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[1];
        DBPrms[0] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, dil);

        try
        {
            DDLLinks.DataSource = vt.DBReaderOlustur("snlg_V1.msp_LinkListele", CommandType.StoredProcedure, DBPrms);
            DDLLinks.DataBind();
        }
        catch { }
        vt.Kapat();
    }
    protected void FVSyf_DataBound(object sender, EventArgs e)
    {
        DropDownList DDLUst = (DropDownList)FVSyf.FindControl("DDLUst");

        DDLUst.Items.Clear();
        DDLUst.Items.Add(new ListItem("Ana Kategori Olsun", ""));
        DDLDoldur(DTKtgler.Select("UstId IS NULL", "Sira"), null, DDLUst);

        DataRow satir = DTKtgler.Rows.Find(editetKtgID);

        try
        {
            if (satir == null || string.IsNullOrEmpty(satir["UstId"].ToString()))
            {
                DDLUst.Items.FindByValue("").Selected = true;
            }
            else
            {
                DDLUst.Items.FindByValue(satir["UstId"].ToString()).Selected = true;
            }
        }
        catch { }
    }