Ejemplo n.º 1
0
    // Event in Row.
    protected void RadGrid1_ItemCommand(object sender, TreeListCommandEventArgs e)
    {
        int    lKeyID = 0;
        string lEvent = e.CommandName;
        string page   = "";

        switch (lEvent)
        {
        case ActRow.Delete:
            lKeyID = int.Parse(e.CommandArgument.ToString());
            int lRowDeleted = DeleteByID(lKeyID);              // Delete Row
            ShowSuccessMes(lRowDeleted + " dòng đã được xoá"); // show Mes.
            LoadData();
            break;

        case ActRow.Edit:
            lKeyID = int.Parse(e.CommandArgument.ToString());
            page   = Page.Request.QueryString["module"];
            TNavigation.EditPage(page, lKeyID);
            break;

        case ActRow.Clone:
            lKeyID = int.Parse(e.CommandArgument.ToString());
            page   = Page.Request.QueryString["module"];
            TNavigation.ClonePage(page, lKeyID);
            break;
        }
    }
Ejemplo n.º 2
0
    protected void RadGrid_Orders_ItemCommand(object sender, GridCommandEventArgs e)
    {
        int    lKeyID = 0;
        string lEvent = e.CommandName;
        string page   = "";

        switch (lEvent)
        {
        case ActRow.Edit:
            lKeyID = int.Parse(e.CommandArgument.ToString());
            page   = WebConfigurationManager.AppSettings["PageOrder"];
            TNavigation.EditPage(page, lKeyID, "401", "edit");
            break;
        }
    }