コード例 #1
0
 /// <summary>
 /// To search menu details by different conditions
 /// </summary>
 /// <param name="DvMenu"></param>
 /// <param name="Column"></param>
 /// <param name="Operator"></param>
 /// <param name="Value"></param>
 public void filterDataview(DataView DvMenu, string Column, string Operator, string Value)
 {
     DvMenu.RowFilter = Column + " " + Operator + "'" + Value + "'";
     if (DvMenu.ToTable().Rows.Count == 0)
     {
         MsgMenu.Msg = "Record(s) not found";
         MsgMenu.showmsg();
         ViewState["DtMenu"] = DvMenu.ToTable();
         BindGrid(DvMenu.ToTable());
     }
     else
     {
         ViewState["DtMenu"] = DvMenu.ToTable();
         BindGrid(DvMenu.ToTable());
     }
 }
コード例 #2
0
    /// <summary>
    /// To Sor Menu ID by Ascending and descending way
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void lnkIDClick(object sender, EventArgs e)
    {
        LinkButton lnk = sender as LinkButton;

        Session["SortMenuID"] = null;
        int MenuIdNew = Convert.ToInt32(lnk.CommandArgument.ToString());

        Session["SortMenuID"] = MenuIdNew.ToString();
        string MenuName = lnk.CssClass.ToString();

        SubMenuBindGrid(MenuIdNew);
        if (grdSubmenu.Rows.Count > 0)
        {
            mpopMenu.Show();
            lblMenu.Text = MenuName;
        }
        else
        {
            MsgMenu.Msg = "Submenu not exist for " + MenuName;
            MsgMenu.showmsg();
        }
    }