protected void imbView_Click(object sender, EventArgs e) { try { int index = int.Parse(((ImageButton)sender).CommandArgument); Session[searchcondition] = GetSearchCondition(); string ticketId = ((Label)gvResult.Rows[index].FindControl("lblTicketId")).Text.Trim(); string campaignId = ((Label)gvResult.Rows[index].FindControl("lblCampaignId")).Text.Trim(); string productId = ((Label)gvResult.Rows[index].FindControl("lblProductId")).Text.Trim(); string type = new ConfigProductScreenBiz().GetFieldType(campaignId, productId, SLMConstant.ConfigProductScreen.ActionType.View); if (Session[nextleadlist] != null) { var list = (List <NextLeadData>)Session[nextleadlist]; NextLeadData obj = list.Where(p => p.TicketId == ticketId).FirstOrDefault(); list.Remove(obj); Session[nextleadlist] = list; } Response.Redirect("SLM_SCR_004.aspx?ticketid=" + ticketId + "&type=" + type + "&backtype=1", false); //Response.Redirect("SLM_SCR_004.aspx?ticketid=" + ((ImageButton)sender).CommandArgument + "&ReturnUrl=" + Server.UrlEncode(Request.Url.AbsoluteUri)); } catch (Exception ex) { string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message; _log.Error(message); AppUtil.ClientAlert(Page, message); } }
private List <NextLeadData> CreateNextLeadList(List <SearchLeadResult> result) { List <NextLeadData> nextLeadList = new List <NextLeadData>(); foreach (SearchLeadResult data in result) { NextLeadData item = new NextLeadData { TicketId = data.TicketId, CampaignId = data.CampaignId, ProductId = data.ProductId }; nextLeadList.Add(item); } return(nextLeadList); }