private void ExecuteQuery() { IList <ExportProcessDC> processes = null; if (Request["owner"] != null) { processes = ExportProcessProxy.GetExportProcessListByCreator(HttpContext.Current.User.Identity.Name); } else { Crab.Business.Contract.ProcessStatus processStatus = (Crab.Business.Contract.ProcessStatus)Enum.Parse(typeof(Crab.Business.Contract.ProcessStatus), DropDownListStatus.SelectedValue); processes = ExportProcessProxy.GetExportProcessListByStatus(processStatus); } this.dGrid.DataSource = processes; this.dGrid.DataBind(); }
private void ShowActionButtons() { // First we hide all buttons HideButtons(); if (CurrentContract == null) { return; } if (Process == null || Process.Status == Crab.Business.Contract.ProcessStatus.Completed || Process.Status == Crab.Business.Contract.ProcessStatus.Teminated) { return; } WorkflowAction[] subscribedActions = ExportProcessProxy.GetSubscribedActions(Process.ProcessId); if (subscribedActions.Length == 0) { lblCurrentStep.Visible = lblCurrentStepCaption.Visible = false; } else { lblCurrentStep.Text = subscribedActions[0].StepName; } foreach (WorkflowAction action in subscribedActions) { switch (action.ActionName) { case ActionConstants.Submit: { if (CanEdit()) { btnSubmit.Visible = true; } } break; case ActionConstants.Approve: { if (CanApprove()) { pnlRemark.Visible = true; btnApprove.Visible = true; } } break; case ActionConstants.Reject: { if (CanApprove()) { pnlRemark.Visible = true; btnReject.Visible = true; } } break; case ActionConstants.Cancel: { if (CanApprove()) { btnCancel.Visible = true; } } break; } } }
protected void btnCancel_Click(object sender, EventArgs e) { ExportProcessProxy.Cancel(Process.ProcessId, CurrentContract.Id, HttpContext.Current.User.Identity.Name); Response.Redirect(Request.RawUrl); }
protected void btnReject_Click(object sender, EventArgs e) { ExportProcessProxy.Reject(Process.ProcessId, Process.ObjectId, HttpContext.Current.User.Identity.Name, this.txtApproveRemark.Text); Response.Redirect(Request.RawUrl); }
protected void btnSubmit_Click(object sender, EventArgs e) { SaveObject(); ExportProcessProxy.Submit(Process.ProcessId, Process.ObjectId, HttpContext.Current.User.Identity.Name); Response.Redirect(Request.RawUrl); }
protected void btnOpenProcess_Click(object sender, EventArgs e) { SaveObject(); ExportProcessProxy.OpenExportProcess(CurrentContract); Response.Redirect(Request.RawUrl); }