protected override void Execute(NativeActivityContext context) { HiringRequestInfo hiringRequestInfo = this.HiringRequestInfo.Get(context); hiringRequestInfo.IsCompleted = this.IsCompleted.Get(context); hiringRequestInfo.IsCancelled = this.IsCancelled.Get(context); hiringRequestInfo.IsSuccess = this.IsSuccess.Get(context); HiringRequestRepository.Save(hiringRequestInfo); }
protected override IAsyncResult BeginOnSave(IDictionary <System.Xml.Linq.XName, object> readWriteValues, IDictionary <System.Xml.Linq.XName, object> writeOnlyValues, TimeSpan timeout, AsyncCallback callback, object state) { HiringRequestInfo info = ExtractHiringRequestInfoFromValues(writeOnlyValues); if (info != null) { HiringRequestRepository.Save(info); } // save the hiring request data here return(base.BeginOnSave(readWriteValues, writeOnlyValues, timeout, callback, state)); }
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; }