protected void Page_Load(object sender, EventArgs e) { // initialize data requestId = Request["id"]; this.info = HiringRequestRepository.Load(requestId); this.currentUser = (Employee)Session["user"]; // show request info this.hiringRequestDetails1.HiringRequestInfo = info; this.hiringRequestDetails1.Editable = false; this.hiringRequestHistory1.HiringRequestId = requestId; // only show the cancellation button to the requester if (!IsPostBack) { this.btnCancel.Visible = (!info.IsCompleted && info.RequesterId.Equals(currentUser.Id)); } }
protected void Page_Load(object sender, EventArgs e) { // get information from state requestId = Request["id"]; state = Request["state"]; // get the user currentUser = (Employee)Session["user"]; // configure the control to show hiring request info info = HiringRequestRepository.Load(requestId); // set UI this.SetControlsVisibility(); this.hiringRequestDetails1.HiringRequestInfo = info; this.hiringRequestDetails1.ShowCommentsField = true; this.hiringRequestHistory1.HiringRequestId = requestId; }