protected void Page_Load(object sender, EventArgs e)
 {
     //目前有三个类型,流程,资产库子表(审批表),资产库表
     if (this.TableName.Equals("BizProcess", StringComparison.OrdinalIgnoreCase))
     {
         CurrentBizProcess = Bll.BizProcessBll.Instance.LoadBizProcess(this.TableRecordId);
     }
     if (this.TableName.Equals("BP19AssetList", StringComparison.OrdinalIgnoreCase))
     {
         CurrentBizProcess = Bll.BizProcessBll.Instance.LoadBizProcess(Bll.BP19AssetListBll.Instance.Load(this.TableRecordId).BizProcessID);
     }
     InitPage();
 }
Esempio n. 2
0
        public UC_ConnectionContent(TransitionDTO transition)
        {
            //بهتره همه دکمه ها یکی بشه
            InitializeComponent();
            Transition = transition;

            SetInfo(Transition);
            BizProcess bizProcess = new BizProcess();
            var        process    = bizProcess.GetProcess(MyProjectManager.GetMyProjectManager.GetRequester(), transition.ProcessID, false);
            //if (process.EntityID == 0)
            //{
            //    btnEditTransitionActionForms.Visibility = Visibility.Collapsed;
            //}
        }
Esempio n. 3
0
 static void Main(string[] args)
 {
     BizProcess.BizLogFile = ConfigurationManager.AppSettings["BizLogFile"];
     try
     {
         BizProcess.WriteLog("\r\n********************** Begin *************************");
         BizProcess.Process();
         BizProcess.WriteLog("********************** End *************************\r\n");
         //Console.ReadLine();
     }
     catch (Exception ex)
     {
         string errorDetail = ex.ToString();
         Console.WriteLine(errorDetail);
     }
 }
Esempio n. 4
0
        private void SetBaseData()
        {
            //cmbType.DisplayMemberPath = "Name";
            //cmbType.SelectedValuePath = "ID";
            cmbType.ItemsSource = bizState.GetStateTypes();

            GetActivities();

            BizProcess bizProcess = new BizProcess();
            //     var process = bizProcess.GetProcess(MyProjectManager.GetMyProjectManager.GetRequester(), ProcessID, false);

            //var col8 = dtgStateTargets.Columns[1] as GridViewComboBoxColumn;
            //col8.ItemsSource = WorkflowHelper.GetGroups(Message.ProcessID);
            //col8.DisplayMemberPath = "Name";
            //col8.SelectedValueMemberPath = "ID";
        }
        //创建BizProcess
        private int NewBizProcess(out string id)
        {
            id = Guid.NewGuid().ToString();
            BizProcess bp = new BizProcess()
            {
                AlarmAction        = 1,
                AlarmPlanSplitDate = DateTime.Now.AddHours(40),
                CreateTime         = DateTime.Now,
                CreatorName        = userN.InnerText,
                IsCurrentVersion   = true,
                IsDeleted          = false,
                ID          = id,
                ParentID    = 0,
                ProcessType = 1,
                Status      = 1,//状态:1未上报;2运行中;4审批完成,归档中;8被退回;流程结束;16流程已取消;32已归档;
                TaskID      = 0,
                Title       = string.Format("{0}_{1}", scope.Items[scope.SelectedIndex].Text, year.Items[year.SelectedIndex].Text)
            };

            //BizProcessAdapter
            return(new BizProcessAdapter().Insert(bp));
        }
Esempio n. 6
0
 public void Run(JobContext context)
 {
     BizProcess.BizLogFile = ConfigurationManager.AppSettings["BizLogFile"];
     BizProcess.Process();
     // biz.jobContext = context;
 }
        public void rptAttachment_DataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                Attachment atta       = e.Item.DataItem as Attachment;
                Image      ibnDelete  = e.Item.FindImage("ibnDelete");
                Image      ibnPreview = e.Item.FindImage("ibnPreview");

                ibnDelete.Attributes.Add("onclick", "deleteAttachFile(this)");
                ibnDelete.Attributes.Add("attaid", atta.AttachmentID.ToString());

                BizProcess bp = Bll.BizProcessBll.Instance.LoadBizProcess(this.TableRecordId);
                if (bp != null && bp.ProcessType == (int)Enumerator.ProcessType.CeoDesktopDataImport)
                {
                    ibnPreview.Attributes.Add("onclick", "showAttachFile(this)");
                    ibnPreview.Attributes.Add("attaid", atta.AttachmentID.ToString());
                }
                else
                {
                    ibnPreview.Visible = false;
                }
                //if (!UseEditMode)
                if (CurrentBizProcess != null)
                {
                    switch ((Enumerator.ProcessStatus)CurrentBizProcess.Status)
                    {
                    case Enumerator.ProcessStatus.Approved:     //已审批完成,不能删除
                    case Enumerator.ProcessStatus.Completed:    //已办结,不能删除
                    {
                        if (CurrentBizProcess.ProcessType == (int)Enumerator.ProcessType.CeoDesktopDataImport)
                        {
                            ibnDelete.Visible  = false;
                            ibnPreview.Visible = true;
                        }
                        else
                        {
                            e.Item.FindControl <HtmlTableCell>("ctlOperation").Controls.Clear();
                        }
                        break;
                    }

                    case Enumerator.ProcessStatus.Approving:      //审批中,只有当前用户能删除
                    case Enumerator.ProcessStatus.Returned:       //已退回,只有当前用户能删除
                    {
                        if (CurrentPage.CurrentUser.UserID != atta.CreateUserID)
                        {
                            if (CurrentBizProcess.ProcessType == (int)Enumerator.ProcessType.CeoDesktopDataImport)
                            {
                                ibnDelete.Visible  = false;
                                ibnPreview.Visible = true;
                            }
                            else
                            {
                                e.Item.FindControl <HtmlTableCell>("ctlOperation").Controls.Clear();
                            }
                        }
                        else
                        {
                            ibnDelete.Visible  = true;
                            ibnPreview.Visible = CurrentBizProcess.ProcessType == (int)Enumerator.ProcessType.CeoDesktopDataImport;
                        }
                        break;
                    }

                    case Enumerator.ProcessStatus.Initialize:     //未上报的和撤销的,都可以删除
                    case Enumerator.ProcessStatus.Canceled:
                    {
                        ibnPreview.Visible = CurrentBizProcess.ProcessType == (int)Enumerator.ProcessType.CeoDesktopDataImport;
                        break;
                    }
                    }
                }
                e.Item.FindHyperLink("hyFileUrl").NavigateUrl = this.Page.ResolveUrl("~/Projects/FileResponse.ashx?attid=" + atta.AttachmentID.ToString());
                var ext = atta.ExtName.ToUpper();
                if (!(ext.Contains("XLS") || ext.Contains("XLSX")))
                {
                    ibnPreview.Visible = false;
                }
            }
        }
 //更新BizProcess信息
 private int UpdateBizProceee(BizProcess bizProcess)
 {
     return(new BizProcessAdapter().Update(bizProcess));
 }
        public List <int> GetProcessAdmins(int processID)
        {
            BizProcess bizProcess = new BizProcess();

            return(bizProcess.GetProcessAdmins(processID));
        }
Esempio n. 10
0
        private string CreateWorkflowInstanceUrl(Wanda.LightWorkflow.WorkflowInstance wf)
        {
            #region
            BizProcess bp        = BizProcessBll.Instance.LoadBizProcess(wf.ProcessInstance.BizProcessID);
            string     strUrlTop = "~/Projects/FinancingExecution";
            string     strUrl    = "";
            int        intWfbpid = wf.ProcessInstance.BizProcessID;
            switch (bp.ProcessType)
            {
            case (int)Enumerator.ProcessType.LoanRepayPlanAdjustment:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/LoanRepayPlan/Edit.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/LoanRepayPlan/Approval.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.LoanImplementationApproval:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/Loan/Edit.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/Loan/Approval.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.OntimeReimbursementApproval:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/Repayment/OnTimeRepaymentEdit.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/Repayment/OnTimeRepaymentApproval.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.EarlyRepaymentApproval:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/Repayment/EarlyRepaymentEdit.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/Repayment/EarlyRepaymentApproval.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.InterestPaymentApproval:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/Repayment/InterestEdit.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/Repayment/InterestApproval.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.RepayFinancingCost:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/Repayment/CostEdit.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/Repayment/CostApproval.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.InterestRateAdjustment:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/Interest/Edit.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/Interest/Approval.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.CollateralMortgage:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/Repayment/GuaranteeEdit.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/Repayment/GuaranteeApproval.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.ChangeContract:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/ChangeContract/Edit.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/ChangeContract/Approval.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.ChangeTaskInfo:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/ChangeTaskInfo/ChangeProjectsInfoEdit.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/ChangeTaskInfo/ChangeProjectsInfoApproval.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.EarlyRepaymentApply:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/Confirm/EarlyRepaymentApply.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/Confirm/EarlyRepaymentConfirm.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.InterestPaymentApply:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/Confirm/InterestApply.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/Confirm/InterestConfirm.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.RepayFinancingCostApply:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/Confirm/CostApply.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/Confirm/CostConfirm.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.LoanImplementationApply:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/Confirm/LoanApply.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/Confirm/LoanConfirm.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.OntimeReimbursementApply:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("{1}/Confirm/OnTimeRepaymentApply.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("{1}/Confirm/OnTimeRepaymentConfirm.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;

            case (int)Enumerator.ProcessType.CommonProcess:
                if (wf.ProcessInstance.Status == (int)Wanda.LightWorkflow.Common.ProcessInstanceStatus.Rejected)
                {
                    strUrl = string.Format("~/Projects/Commons/CommonProcess/Edit.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                else
                {
                    strUrl = string.Format("~/Projects/Commons/CommonProcess/Approval.aspx?BizProcessID={0}", intWfbpid, strUrlTop);
                }
                break;
            }
            return(strUrl);

            #endregion
        }