当前位置: 首页>>代码示例>>C#>>正文


C# WorkflowService.GetActivityEntity方法代码示例

本文整理汇总了C#中Slickflow.Engine.Service.WorkflowService.GetActivityEntity方法的典型用法代码示例。如果您正苦于以下问题:C# WorkflowService.GetActivityEntity方法的具体用法?C# WorkflowService.GetActivityEntity怎么用?C# WorkflowService.GetActivityEntity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Slickflow.Engine.Service.WorkflowService的用法示例。


在下文中一共展示了WorkflowService.GetActivityEntity方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetActivity

        /// <summary>
        /// 获取节点信息
        /// </summary>
        /// <param name="processGUID"></param>
        /// <param name="version"></param>
        /// <param name="activityGUID"></param>
        /// <returns></returns>
        public ActivityEntity GetActivity(string processGUID, string version, string activityGUID)
        {
            var wfService = new WorkflowService();
            var activityEntity = wfService.GetActivityEntity(processGUID, version, activityGUID);

            return activityEntity;
        }
开发者ID:huoxudong125,项目名称:Slickflow,代码行数:14,代码来源:WfAppInteropService.cs

示例2: InitFlowInfo

        protected void InitFlowInfo()
        {
            int AppInstanceID = Request.QueryString["AppInstanceID"] == null ? 0 : Helper.ConverToInt32(Request.QueryString["AppInstanceID"].ToString());
            string ProcessGUID = Request.QueryString["ProcessGUID"] == null ? string.Empty : Request.QueryString["ProcessGUID"].ToString();
            int ActivityInstanceID = Request.QueryString["ActivityInstanceID"] == null ? 0 : Helper.ConverToInt32(Request.QueryString["ActivityInstanceID"].ToString());
            if (AppInstanceID > 0)
            {
                HrsLeaveEntity hrsLeaveEntity = WorkFlows.GetHrsLeaveModel(AppInstanceID);
                if (hrsLeaveEntity != null && hrsLeaveEntity.ID > 0)
                {
                    selectLeaveType.Value = hrsLeaveEntity.LeaveType.ToString();
                    selectLeaveType.Disabled = true;
                    txtDays.Value = hrsLeaveEntity.Days.ToString();
                    txtFromDate.Value = hrsLeaveEntity.FromDate.ToString("yyyy-MM-dd");
                    txtToDate.Value = hrsLeaveEntity.ToDate.ToString("yyyy-MM-dd");
                    hiddenInstanceId.Value = hrsLeaveEntity.ID.ToString();
                    hiddenActivityInstanceID.Value = ActivityInstanceID.ToString();

                    this.txtDepmanagerRemark.Value = hrsLeaveEntity.DepManagerRemark;
                    this.txtDirectorRemark.Value = hrsLeaveEntity.DirectorRemark;//主管总监
                    this.txtDeputyGeneralRemark.Value = hrsLeaveEntity.DeputyGeneralRemark;//副总经理
                    this.txtGeneralManagerRemark.Value = hrsLeaveEntity.GeneralManagerRemark;//总经理

                    //权限设置
                    IWorkflowService service = new WorkflowService();
                    ProcessEntity processEntity = service.GetProcessById(ProcessGUID);
                    if (processEntity != null)
                    {
                        this.txtProcessGUID.Value = processEntity.ProcessGUID.ToString();

                        ActivityInstanceEntity activityInstanceEntity = service.GetActivityInstance(ActivityInstanceID);
                        if (activityInstanceEntity != null)
                        {
                            ActivityEntity activityEntity = service.GetActivityEntity(ProcessGUID, activityInstanceEntity.ActivityGUID);
                            if (activityEntity != null && activityEntity.Roles != null && activityEntity.Roles.Count > 0)
                            {
                                foreach (var role in activityEntity.Roles)
                                {
                                    if (role.ID == LoginRoleID)
                                    {
                                        switch (role.ID)
                                        {
                                            case 2://部门经理
                                                this.txtDepmanagerRemark.Disabled = false;
                                                hiddenPerformField.Value = "DepManager";
                                                break;

                                            case 4://主管总监
                                                this.txtDirectorRemark.Disabled = false;
                                                hiddenPerformField.Value = "Director";
                                                break;

                                            case 7://副总经理
                                                this.txtDeputyGeneralRemark.Disabled = false;
                                                hiddenPerformField.Value = "Deputy";
                                                break;

                                            case 8://总经理
                                                this.txtGeneralManagerRemark.Disabled = false;
                                                hiddenPerformField.Value = "General";
                                                break;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
开发者ID:zengcheng,项目名称:Slickflow,代码行数:70,代码来源:HrsLeaveApproval.aspx.cs

示例3: List

        public ActionResult List(int id = 1, string processGuid = "", int activityInstanceID = 0)
        {
            if (id == 1)
            {
                ViewBag.Message = "非法链接";
                return View();
            }
            else
            {
                if (string.IsNullOrEmpty(processGuid))
                {
                    WorkFlowManager work = new WorkFlowManager();
                    LeaveEntity entity = work.FindById(id);
                    string s = @"<table class='table table-bordered'>"
                                + "<tr><td>部门经理</td><td>" + entity.DepManagerRemark + "</td></tr>"
                                + "<tr><td>主管总监 </td><td>" + entity.DirectorRemark + "</td></tr>"
                                + "<tr><td>副总经理</td><td>" + entity.DeputyGeneralRemark + "</td></tr>"
                                + "<tr><td>总经理</td><td>" + entity.GeneralManagerRemark + "</td> </tr></table>";
                    ViewBag.Shenpi = s;
                    return View(entity);
                }
                else
                {
                    WorkFlowManager work = new WorkFlowManager();
                    LeaveEntity entity = work.FindById(id);
                    //权限设置
                    IWorkflowService service = new WorkflowService();
                    ProcessEntity processEntity = service.GetProcessById(processGuid);
                    if (processEntity != null)
                    {
                        ActivityInstanceEntity activityInstanceEntity = service.GetActivityInstance(activityInstanceID);
                        string s = "";
                        if (activityInstanceEntity != null)
                        {
                            ActivityEntity activityEntity = service.GetActivityEntity(processGuid, activityInstanceEntity.ActivityGUID);
                            if (activityEntity != null && activityEntity.Roles != null && activityEntity.Roles.Count > 0)
                            {
                                //用户角色列表
                                IList<string> roleUser = UserManager.GetRoles(Convert.ToInt32(User.Identity.GetUserId()));

                                foreach (var role in activityEntity.Roles)
                                {
                                    //为方便起见这里只取第一个角色,开发人员可以自行调整
                                    if (role.RoleCode == roleUser[0].ToString())
                                    {
                                        switch (role.ID)
                                        {
                                            case 2:
                                                //部门经理审批
                                                s = @"<table class='table table-bordered'>" +
                                               "<tr><td>部门经理</td><td><input type='text'class='form-control' name='DepManagerRemark'></td></tr>" +
                                               "<tr><td>主管总监 </td><input type='text' class='form-control' name='DirectorRemark' style='display:none'></td></tr>" +
                                               "<tr><td>副总经理</td><td><input type='text' class='form-control' name='DeputyGeneralRemark' style='display:none'></td></tr>" +
                                               "<tr><td>总经理</td><td><input class='form-control' name='GeneralManagerRemark'  style='display:none' type='text' /> </td> </tr>"
                                                ;
                                                break;
                                            case 3:
                                                //主管总监审批
                                                s = @"<table class='table table-bordered'>" +
                                               "<tr><td>部门经理</td><td>" + entity.DepManagerRemark + "<input type='text'class='form-control'  style='display:none' name='DepManagerRemark' value='" + entity.DepManagerRemark + "'></td></tr>" +
                                               "<tr><td>主管总监 </td><input type='text' class='form-control' name='DirectorRemark' ></td></tr>" +
                                               "<tr><td>副总经理</td><td><input type='text' class='form-control' name='DeputyGeneralRemark' style='display:none'></td></tr>" +
                                               "<tr><td>总经理</td><td><input class='form-control' name='GeneralManagerRemark'  style='display:none' type='text' /> </td> </tr>"
                                                                                   ;
                                                break;
                                            case 7:
                                                //副总经理审批
                                                s = @"<table class='table table-bordered'>" +
                                               "<tr><td>部门经理</td><td>" + entity.DepManagerRemark + "<input type='text'class='form-control' style='display:none' name='DepManagerRemark' value='" + entity.DepManagerRemark + "'></td></tr>" +
                                               "<tr><td>主管总监 </td><td>" + entity.DirectorRemark + "<input type='text' class='form-control' name='DirectorRemark' value='" + entity.DirectorRemark + "' ></td></tr>" +
                                               "<tr><td>副总经理</td><td><input type='text' class='form-control' name='DeputyGeneralRemark' style='display:none'></td></tr>" +
                                               "<tr><td>总经理</td><td><input class='form-control' name='GeneralManagerRemark'  style='display:none' type='text' /> </td> </tr>";
                                                break;
                                            case 8:
                                                //总经理审批
                                                s = @"<table class='table table-bordered'>" +
  "<tr><td>部门经理</td><td>" + entity.DepManagerRemark + "<input type='text'class='form-control' style='display:none' name='DepManagerRemark' value='" + entity.DepManagerRemark + "'></td></tr>" +
  "<tr><td>主管总监 </td><td>" + entity.DirectorRemark + "<input type='text' class='form-control' name='DirectorRemark' value='" + entity.DirectorRemark + "' ></td></tr>" +
  "<tr><td>副总经理</td><td><input type='text' class='form-control' name='DeputyGeneralRemark' style='display:none' value='" + entity.DeputyGeneralRemark + "'></td></tr>" +
  "<tr><td>总经理</td><td><input class='form-control' name='GeneralManagerRemark' type='text' /> </td> </tr>"
                                      ;
                                                break;
                                        }
                                    }
                                }
                            }
                        }
                        //获取当前角色      
                        ViewBag.Shenpi = "<form action='' id='Remark'>" + s + "</table></form><button class='btn btn-primary' id='agree'>同意</button><button class='btn btn-primary' id='return'>退回</button>";
                        ViewBag.processGUID = processGuid;
                        ViewBag.days = entity.Days;
                        return View(entity);
                    }
                }
            }
            //表示出现错误
            return View();
        }
开发者ID:zengcheng,项目名称:Slickflow,代码行数:98,代码来源:LeaveController.cs


注:本文中的Slickflow.Engine.Service.WorkflowService.GetActivityEntity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。