protected void btnSubmit_Click(object sender, EventArgs e) { var user = Request.Form.Get("username"); if (!user.Equals("")) { _stateless = new Stateless(user, Request.Form.Get("emailaddress"), Request.Form.Get("ordertitle"), Request.Form.Get("orderdesc")); _stateless.Assign(user, ""); Session["Stateless"] = _stateless; } }
protected void btnAssignFromApprove_Click(object sender, EventArgs e) { if (Session["Stateless"] != null) { _stateless = (Stateless)Session["Stateless"]; } if (_stateless == null) { ClientScript.RegisterClientScriptBlock(this.GetType(), "Alert", "<script>alert('You need to request a new element at first.');</script>"); return; } var user = Request.Form.Get("approveduser"); if (!user.Equals("")) { _stateless.Assign(user, Request.Form.Get("approvedcomment")); } }