Beispiel #1
0
 void linkCommand_Command(object sender, CommandEventArgs e)
 {
     if (e.CommandName == "Samplers")
     {
         PageDataTransfer sampleTransfer = new PageDataTransfer("/GINSamplers.aspx");
         sampleTransfer.TransferData["SampleId"]         = new Guid((string)e.CommandArgument);
         sampleTransfer.TransferData["TransactionId"]    = transferedData.GetTransferedData("TransactionId");
         sampleTransfer.TransferData["IsGINTransaction"] = false;
         sampleTransfer.TransferData["ReturnPage"]       = HttpContext.Current.Request.Path;
         GINProcessWrapper.RemoveGINProcessInformation();
         transferedData.RemoveAllData();
         sampleTransfer.Navigate();
     }
     else if (e.CommandName == "Results")
     {
         PageDataTransfer sampleTransfer = new PageDataTransfer("/GINSamplingResults.aspx");
         sampleTransfer.TransferData["SampleId"]         = new Guid((string)e.CommandArgument);
         sampleTransfer.TransferData["TransactionId"]    = transferedData.GetTransferedData("TransactionId");
         sampleTransfer.TransferData["IsGINTransaction"] = false;
         sampleTransfer.TransferData["ReturnPage"]       = HttpContext.Current.Request.Path;
         GINProcessWrapper.RemoveGINProcessInformation();
         transferedData.RemoveAllData();
         sampleTransfer.Navigate();
     }
     else if (e.CommandName == "EditSample")
     {
         SampleDataEditor.IsNew = false;
         var sampleToEdit = from sample in ginProcess.GINProcessInformation.Samples
                            where sample.Id == new Guid((string)e.CommandArgument)
                            select sample;
         SampleDataEditor.DataSource = sampleToEdit.ElementAt(0);
         SampleDataEditor.DataBind();
         SampleDataEditorContainer.Attributes["class"] = "ShowPopupEditor";
     }
 }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SamplerGridViewer.DataSource = SampleInformation.Samplers;
            SamplerGridViewer.DataBind();
            var samplerGridCommands = from command in SamplerGridViewer.Driver.Columns
                                      where command.IsCommand
                                      select command.AttachedRenderer;

            foreach (LinkGINColumnRenderer linkCommand in samplerGridCommands)
            {
                linkCommand.Command += new CommandEventHandler(linkCommand_Command);
            }

            if (!IsPostBack)
            {
                SampleDataEditor.DataSource = SampleInformation;
                SampleDataEditor.DataBind();
            }
        }