Esempio n. 1
0
 /// <summary>
 /// 数据绑定
 /// </summary>
 public void InitBind()
 {
     if (hid_RoleID.Value != "")
     {
         Sys_Role modelRole = bllRole.Get(p => p.RoleID == hid_RoleID.Value);
         if (modelRole != null)
         {
             FormModel.SetForm(this, modelRole, "txt");
             hid_RoleName.Value = modelRole.Role_Name;
         }
         else
         {
             MessageBox.ShowAndRedirect(this, "该数据不存在!", "RoleList.aspx");
         }
     }
 }
 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;
                     }
                 }
             }
         }
     }
 }