Example #1
0
    //void dataGridView1_PreviewKeyDown(object sender, GridViewPageEventArgs e) {
    //    if (e.KeyCode == Keys.Enter) {
    //        int i = dataGridView1.CurrentRow.Index;
    //        MessageBox.Show(i.ToString());
    //    }
    //}

    private void setMoveFile(MyEventChangeFileOrder myEvent, GridView gv, GridViewCommandEventArgs e)
    {
        myEvent.GridViewInner            = gv;
        myEvent.GridViewRowSelected      = gv.Rows[Convert.ToInt32(e.CommandArgument)];
        myEvent.DestinationCurrentFolder = this.DestinationCurrentFolder;
        myEvent.DestinationHomeFolder    = this.DestinationHomeFolder;
        myEvent.DestWebServerFolder      = this.DestinationWebServerFolder;
        myEvent.Response = Response;
    }
Example #2
0
    protected void InnerRowCommand(object sender, GridViewCommandEventArgs e)
    {
        GridView gv         = sender as GridView;
        int      totalFiles = (sender as GridView).Rows.Count;
        var      ee         = (sender as GridView).Parent.Parent;
        string   folder     = (((sender as GridView).Parent.Parent as GridViewRow).FindControl("ltlFileItem") as Literal).Text;

        folder = cleanString(folder);
        string currentFolder = DestinationCurrentFolder + "\\" + folder;

        switch (e.CommandName)
        {
        case "MoveUp":
        case "MoveDown":
            MyEventChangeFileOrder myEvent = new MyEventChangeFileOrder();
            setMoveFile(myEvent, gv, e);
            if (e.CommandName == "MoveUp")
            {
                myEvent.moveUp();
            }
            else
            {
                myEvent.moveDown();
            }
            break;

        case "Rename":
            setRename(gv, Convert.ToInt32(e.CommandArgument));
            break;

        case "Archive":
        case "ArchiveCancel":
        case "ArchiveComfirm":
            archive(gv, e);
            break;
        }
    }