private void archive(GridView gv, GridViewCommandEventArgs e) { MyEventArchive archive = new MyEventArchive(); if (MyEventArchive == null) { setArchive(archive); } else { archive = MyEventArchive; } setArchiveGridView(archive, gv, Convert.ToInt32(e.CommandArgument), Response); switch (e.CommandName) { case "Archive": archive.Archive(); break; case "ArchiveCancel": archive.ArchiveCancel(); break; case "ArchiveComfirm": archive.ArchiveComfirm(); break; } MyEventArchive = archive; }
private void setArchive(MyEventArchive archive) { if (MyEventArchive != null) { archive = MyEventArchive; } archive.DestinationCurrentFolder = this.DestinationCurrentFolder; archive.DestinationHomeFolder = this.DestinationHomeFolder; archive.DestWebServerFolder = this.DestinationWebServerFolder; archive.Response = Response; MyEventArchive = archive; }
private void setArchiveGridView(MyEventArchive archive, GridView gv, int rowIndex, HttpResponse response) { archive.GridViewInner = gv; archive.GridViewRowSelected = gv.Rows[rowIndex]; archive.Response = response; }