protected void btnNextStep_Click(object sender, EventArgs e) { BurrowFramework bf = new BurrowFramework(); IConversation conversation = bf.CurrentConversation; //int step = (int)conversation.Items["step"]; int step = (int)Session["step"]; step++; //conversation.Items["step"] = step; Session["step"] = step; if (step < 5) { btnNextStep.Text = "step 1 + " + step + "/5"; Checker.CheckSpanningConversations(1); } else { conversation.FinishSpan(); Checker.CheckSpanningConversations(0); Response.Redirect("Step02.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BurrowFramework bf = new BurrowFramework(); IConversation conversation = bf.CurrentConversation; Checker.CheckSpanningConversations(1); if (conversation == null) { throw new Exception("The page doesn't have conversation"); } object lastConversationId = Session["conversationId"]; if (lastConversationId == null) { throw new Exception("We haven't found the Id of previous conversation"); } if (!conversation.Id.Equals(lastConversationId)) { throw new Exception("The conversation isn't same that previous, the new conversation was created"); } conversation.FinishSpan(); } }
protected void btnClose_Click(object sender, EventArgs e) { BurrowFramework bf = new BurrowFramework(); IConversation conversation = bf.CurrentConversation; Session["continue"] = true; conversation.FinishSpan(); Checker.CheckSpanningConversations(1); hdClose.Value = "1"; }