private void BingDDL()
        {
            Workflow_TasksExBLL     workflowTasksExBLL = new Workflow_TasksExBLL();
            List <Workflow_TasksEx> tasksExList        = workflowTasksExBLL.GetAll().ToList();

            this.ddlworkflowTasksEx.DataSource     = tasksExList;
            this.ddlworkflowTasksEx.DataTextField  = "TasksEx_Name";
            this.ddlworkflowTasksEx.DataValueField = "TasksEx_InstanceID";
            this.ddlworkflowTasksEx.DataBind();

            this.ddlworkflowTasksEx.Items.Insert(0, new ListItem()
            {
                Text = "--请选择--", Value = ""
            });


            Workflow_AuditActionDefinitionBLL     auditActionDefinitionBLL  = new Workflow_AuditActionDefinitionBLL();
            List <Workflow_AuditActionDefinition> auditActionDefinitionList = auditActionDefinitionBLL.GetAll().ToList();

            this.ddlAuditActionDefinition.DataSource     = auditActionDefinitionList;
            this.ddlAuditActionDefinition.DataTextField  = "AuditActionDefinition_Name";
            this.ddlAuditActionDefinition.DataValueField = "AuditActionDefinitionID";
            this.ddlAuditActionDefinition.DataBind();

            BingWfConfigNodeID();
        }
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public string DelInfo(string id)
 {
     if (id.Length > 0)
     {
         Common_BLL          pg       = new Common_BLL();
         Sys_MenuBLL         bllMenu  = new Sys_MenuBLL();
         SessionUserModel    userInfo = CurrUserInfo();
         Workflow_TasksExBLL bll      = new Workflow_TasksExBLL();
         if (pg.Delete(UCEasyUIDataGrid.TableName, UCEasyUIDataGrid.TableKey, "'" + id + "'", ""))
         {
             //删除待办事项
             new RoleConfig().DeleteMatterTasks(id.Replace("'", ""));
             string   rtnUrl    = Request.RawUrl;
             Sys_Menu MenuModel = bllMenu.FindByURL(rtnUrl);
             if (MenuModel != null)
             {
                 if (!string.IsNullOrEmpty(MenuModel.Menu_Name))
                 {
                     pg.AddLog(MenuModel.Menu_Name, id, "删除", "ID=" + id + "", userInfo.UserID, userInfo.DepartmentCode);
                 }
             }
             return("1");
         }
         else
         {
             return("0");
         }
     }
     else
     {
         return("0");
     }
 }
示例#3
0
        /// <summary>
        /// 操作
        /// </summary>
        private void Save()
        {
            Workflow_TasksExBLL bll    = new Workflow_TasksExBLL();
            Workflow_TasksEx    entity = new Workflow_TasksEx();
            string msg = string.Empty;

            if (string.IsNullOrEmpty(id))
            {
                entity.TasksEx_AddUserID     = CurrUserInfo().UserID;
                entity.TasksEx_InstanceNo    = txtWorkflowTasks_InstanceNo.Text.Trim();
                entity.TasksEx_InstanceVerNo = txtWorkflowTasks_InstanceVerNo.Text.Trim();
                entity.TasksEx_IsValid       = Convert.ToBoolean(drp_WorkflowTasks_IsValid.SelectedValue);
                entity.TasksEx_Name          = txtWorkflowTasks_Name.Text.Trim();
                entity.TasksEx_InstanceID    = Guid.NewGuid().ToString();
                entity.TasksEx_AddTime       = DateTime.Now;
                entity.TasksEx_Type          = drp_WorkflowTasks_Type.SelectedValue;
                if (bll.Add(entity))
                {
                    MessageBox.ResponseScript(this, "alert('保存成功!');parent.location.reload();");
                }
                else
                {
                    MessageBox.Show(this, msg);
                }
            }
            else
            {
                entity = bll.Get(p => p.TasksEx_InstanceID == id);
                entity.TasksEx_InstanceNo    = txtWorkflowTasks_InstanceNo.Text.Trim();
                entity.TasksEx_InstanceVerNo = txtWorkflowTasks_InstanceVerNo.Text.Trim();
                entity.TasksEx_IsValid       = Convert.ToBoolean(drp_WorkflowTasks_IsValid.SelectedValue);
                entity.TasksEx_Name          = txtWorkflowTasks_Name.Text.Trim();
                entity.TasksEx_Type          = drp_WorkflowTasks_Type.SelectedValue;
                if (bll.Update(entity))
                {
                    MessageBox.ResponseScript(this, "alert('保存成功');parent.location.reload();");
                }
                else
                {
                    MessageBox.Show(this, msg);
                }
            }
        }
        private void getTreeData(HttpContext context)
        {
            StringBuilder sb = new StringBuilder();

            List <Workflow_NodeConfigEx> nodeConfigExList = new List <Workflow_NodeConfigEx>();

            List <View_Workflow_NodeRoute> NodeRouteList = new View_Workflow_NodeRouteBLL().GetAll().ToList();

            nodeConfigExList = new Workflow_NodeConfigExBLL().GetAll().OrderBy(p => p.NodeConfigEx_Setp).ToList();
            List <Workflow_TasksEx> entityTasksList = new Workflow_TasksExBLL().GetAll().ToList();
            List <combotree>        comtree         = new List <combotree>();

            foreach (var tree in entityTasksList)
            {
                comtree.Add(new combotree {
                    id = tree.TasksEx_InstanceID, text = tree.TasksEx_Name, state = "open", children = SetMenu(nodeConfigExList, tree.TasksEx_InstanceID, NodeRouteList)
                });
            }
            string jsonPerson = JsonConvert.SerializeObject(comtree);

            sb.Append(jsonPerson);
            context.Response.Write(sb.ToString());
        }
示例#5
0
        private void getTreeData(HttpContext context)
        {
            StringBuilder sb       = new StringBuilder();
            string        parentId = string.Empty;

            if (!string.IsNullOrEmpty(context.Request.QueryString["id"]))
            {
                parentId = context.Request.QueryString["id"];
            }

            List <Workflow_NodeConfigEx> nodeConfigExList = new List <Workflow_NodeConfigEx>();

            nodeConfigExList = new Workflow_NodeConfigExBLL().GetList(p => p.NodeConfigEx_TasksInstanceID == parentId).OrderBy(p => p.NodeConfigEx_Setp).ToList();
            Workflow_TasksEx entityTasks = new Workflow_TasksExBLL().Get(p => p.TasksEx_InstanceID == parentId);
            List <combotree> comtree     = new List <combotree>();

            comtree.Add(new combotree {
                id = entityTasks.TasksEx_InstanceID, text = entityTasks.TasksEx_Name, state = "open", children = SetMenu(nodeConfigExList, entityTasks.TasksEx_InstanceID)
            });
            string jsonPerson = JsonConvert.SerializeObject(comtree);

            sb.Append(jsonPerson);
            context.Response.Write(sb.ToString());
        }