Ejemplo n.º 1
0
        private void getDownData(HttpContext context)
        {
            string id    = context.Request.QueryString["id"];
            int?   sort  = context.Request.QueryString["sort"].ToInt(0);
            string parid = context.Request.QueryString["parid"];

            //entityList = bll.FindWhere(p => p.WorkflowNodeConfig_TasksInstanceID == id && p.WorkflowNodeConfig_Setp>sort).OrderBy(p => p.WorkflowNodeConfig_Setp).ToList();
            //if (entityList.Count > 0)
            //{
            //    sort = entityList.Last().WorkflowNodeConfig_Setp;
            //    entity = bll.Find(p => p.WorkflowNodeConfigID == parid);
            //    entity.WorkflowNodeConfig_Setp = sort;
            //    if(!bll.Update(entity,out msg))
            //    {
            //        context.Response.Write("{\"data\":\"1\"}");
            //    }
            //}
            entity = bll.Get(p => p.NodeConfigExID == parid);

            entity.NodeConfigEx_Setp       = sort + 1;
            entity.NodeConfigEx_UpdateTime = DateTime.Now;
            if (bll.Update(entity))
            {
                context.Response.Write("{\"data\":\"1\"}");
            }
            else
            {
                context.Response.Write("{\"data\":\"0\"}");
            }
        }
 private void Show()
 {
     string id = Request["id"];
     if (!string.IsNullOrEmpty(id))
     {
         Workflow_NodeConfigEx entity = new Workflow_NodeConfigEx();
         Sys_UserInfoBLL UserBll = new Sys_UserInfoBLL();
         Sys_RoleBLL RoleBll = new Sys_RoleBLL();
         entity = bll.Get(p => p.NodeConfigExID == id);
         if (entity.IsNotNull())
         {
             txtWorkflowNodeConfig_Name.Text = entity.NodeConfigEx_Name;
             txtWorkflowNodeConfig_Setp.Text = entity.NodeConfigEx_Setp == null ? "" : entity.NodeConfigEx_Setp.ToString();
             drpWorkflowNodeConfig_AuditMode.SelectedValue = entity.NodeConfigEx_AuditMode;
             ddlMechanism.SelectedValue = entity.NodeConfigEx_Mechanism.SafeToString("0");
             hidAutoOption.Value = entity.NodeConfigEx_DistributionRule;
             string objectId = hid_DepCode.Value = entity.NodeConfigEx_AuditObjectID;
             ddlNodeSign.SelectedValue = entity.NodeConfigEx_NodeSign;
             hid_NodeConfigEx_DataMappingID.Value = entity.NodeConfigEx_DataMappingID;
             //ckoNodeConfigEx_IsDisplayContract.Checked = entity.NodeConfigEx_IsDisplayContract.ToType(false);
             if (!string.IsNullOrEmpty(objectId))
             {
                 if (drpWorkflowNodeConfig_AuditMode.SelectedValue == "0")
                 {
                     Sys_Role role = RoleBll.Get(p => p.RoleID == objectId);
                     if (role.IsNotNull())
                     {
                         txt_Dep.Text = role.Role_Name;
                     }
                 }
                 else
                 {
                     Sys_UserInfo UserInfo = UserBll.Get(p => p.UserInfoID == objectId);
                     if (UserInfo.IsNotNull())
                     {
                         txt_Dep.Text = UserInfo.UserInfo_FullName;
                     }
                 }
             }
         }
     }
 }