Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["sid"] == null && !Page.IsPostBack)
     {
         FVSyf.ChangeMode(FormViewMode.Insert);
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(dil))
        {
            dil = Snlg_ConfigValues.defaultLangId;
        }

        if (editetKtgID == null && !Page.IsPostBack)
        {
            FVSyf.ChangeMode(FormViewMode.Insert);
            LblFBas.Text = "Yeni Kategori Oluşturun";
        }
        else
        {
            LblFBas.Text = "Kategori Bilgilerini Düzenleyin";
        }

        if (!Page.IsPostBack)
        {
            //memüler listeleniyor
            StringBuilder SBMenu = new StringBuilder();
            MenuleriDoldur(DTKtgler, SBMenu, DTKtgler.Select("UstId IS NULL", "Sira"));
            ltrMenu.Text = SBMenu.ToString();
        }
    }
Esempio n. 3
0
 protected void FVSyf_DataBound(object sender, EventArgs e)
 {
     if (FVSyf.CurrentMode == FormViewMode.Insert)
     {
         ((RadioButtonList)FVSyf.FindControl("RBL1")).SelectedIndex = 0;
     }
 }
 protected void SDSSyf_Selected(object sender, SqlDataSourceStatusEventArgs e)
 {
     if (e.AffectedRows < 1)
     {
         FVSyf.ChangeMode(FormViewMode.Insert);
     }
     else
     {
         FVSyf.ChangeMode(FormViewMode.Edit);
     }
 }
 protected void BtnRSil_Click(object sender, EventArgs e)
 {
     if (YetkiKontrol(pageName + "-Delete"))
     {
         Snlg_DBConnect vt = new Snlg_DBConnect(true);
         vt.SorguCalistir("UPDATE snlg_v1.TblMakaleKtgApp SET Resim = NULL WHERE KtgID = " + editetKtgID, CommandType.Text);
         vt.Kapat();
         FVSyf.DataBind();
         Snlg_Hata.ziyaretci.HataGosterBasarili("Resim silindi.", false);
     }
 }
Esempio n. 6
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;
        }
    }
Esempio n. 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(dil))
        {
            dil = Snlg_ConfigValues.defaultLangId;
        }

        if (editedMenuID == null && !Page.IsPostBack)
        {
            FVSyf.ChangeMode(FormViewMode.Insert);
            LblFBas.Text = "Yeni Menü Öğesi Oluşturun";
        }
        else
        {
            LblFBas.Text = "Menü Bilgilerini Düzenleyin";
        }

        if (!Page.IsPostBack)
        {
            DDLMenuGroup.DataSource = dtMenuGroup;
            DDLMenuGroup.DataBind();
            DDLMenuGroup.Items.Insert(0, new ListItem("Seçiniz", "-1"));

            DDLMenuGroup.ClearSelection();
            try { DDLMenuGroup.SelectedValue = UCId; }
            catch { }

            //memüler listeleniyor
            StringBuilder SBMenu = new StringBuilder();
            MenuleriDoldur(DTMenuler, SBMenu, DTMenuler.Select("UstId IS NULL", "Sira"));
            ltrMenu.Text = SBMenu.ToString();

            if (UCId == "-1")
            {
                Pnl1.Visible = false;
            }
            else
            {
                Pnl1.Visible = true;
            }
        }
    }
Esempio n. 9
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 { }
    }