Example #1
0
        /// <summary>
        /// 修改子表单
        /// </summary>
        /// <param name="ctx"></param>
        private void EditChildForm(HttpContext ctx)
        {
            try
            {
                var                returnValue = -1;
                var                vUser       = Utils.UserInfo;
                string             id          = PublicMethod.GetString(WebCommon.StringHelper.GetRequestObject("keyId"));
                UserControlsEntity entity      = null;
                if (!string.IsNullOrEmpty(id))
                {
                    var dtTemp = RDIFrameworkService.Instance.WorkFlowUserControlService.GetChildUserControl(Utils.UserInfo, id);
                    if (dtTemp != null && dtTemp.Rows.Count > 0)
                    {
                        entity = BaseEntity.Create <UserControlsEntity>(dtTemp);
                        entity = this.GetPageUserControlEntity(entity);
                    }
                }
                returnValue = RDIFrameworkService.Instance.WorkFlowUserControlService.UpdateUserControl(vUser, entity);

                ctx.Response.Write(returnValue > 0
                    ? new JsonMessage {
                    Success = true, Data = "1", Message = "修改成功!"
                }.ToString()
                    : new JsonMessage {
                    Success = false, Data = "0", Message = "修改失败!"
                }.ToString());
            }
            catch (Exception ex)
            {
                ctx.Response.Write(new JsonMessage {
                    Success = false, Data = "-1", Message = "操作失败!" + ex.Message
                }.ToString());
            }
        }
Example #2
0
        /// <summary>
        /// 增加子表单
        /// </summary>
        /// <param name="ctx"></param>
        private void AddChildForm(HttpContext ctx)
        {
            var entity = new UserControlsEntity();
            var vUser  = Utils.UserInfo;

            entity            = this.GetPageUserControlEntity(entity);
            entity.Id         = BusinessLogic.NewGuid();
            entity.DeleteMark = 0;

            try
            {
                var statusMessage = RDIFrameworkService.Instance.WorkFlowUserControlService.InsertUserControl(vUser, entity);
                ctx.Response.Write(!string.IsNullOrEmpty(statusMessage)
                    ? new JsonMessage {
                    Success = true, Data = "1", Message = RDIFrameworkMessage.MSG0009
                }.ToString()
                    : new JsonMessage {
                    Success = false, Data = "0", Message = RDIFrameworkMessage.MSG3020
                }.ToString());
            }
            catch (Exception ex)
            {
                ctx.Response.Write(new JsonMessage {
                    Success = false, Data = "-1", Message = "增加失败!" + ex.Message
                }.ToString());
            }
        }
Example #3
0
        private void SaveUIData()
        {
            var ucType = "1";

            if (rbType1.Checked)
            {
                ucType = "1";
            }

            if (rbType2.Checked)
            {
                ucType = "2";
            }

            if (rbType3.Checked)
            {
                ucType = "3";
            }

            var entity = new UserControlsEntity
            {
                Id           = NowNodeId,
                FullName     = txtFullName.Text,
                Path         = txtPath.Text,
                Description  = txtDes.Text,
                ControlId    = txtControlId.Text,
                FormName     = txtFormName.Text,
                AssemblyName = txtAssemblyName.Text,
                Type         = ucType
            };

            RDIFrameworkService.Instance.WorkFlowUserControlService.UpdateUserControl(this.UserInfo, entity);
        }
Example #4
0
 private UserControlsEntity GetPageUserControlEntity(UserControlsEntity entity)
 {
     entity.FullName     = PublicMethod.GetString(WebCommon.StringHelper.GetRequestObject("FullName"));
     entity.Type         = PublicMethod.GetString(WebCommon.StringHelper.GetRequestObject("Type"));
     entity.Path         = PublicMethod.GetString(WebCommon.StringHelper.GetRequestObject("Path"));
     entity.ControlId    = PublicMethod.GetString(WebCommon.StringHelper.GetRequestObject("ControlId"));
     entity.FormName     = PublicMethod.GetString(WebCommon.StringHelper.GetRequestObject("FormName"));
     entity.AssemblyName = PublicMethod.GetString(WebCommon.StringHelper.GetRequestObject("AssemblyName"));
     entity.Enabled      = PublicMethod.GetString(WebCommon.StringHelper.GetRequestObject("Enabled")) == "on" ? 1 : 0;
     entity.Description  = PublicMethod.GetString(WebCommon.StringHelper.GetRequestObject("Description"));
     return(entity);
 }
Example #5
0
 public void UpdateWorkflowNode()
 {
     try
     {
         var entity = new UserControlsEntity
         {
             Id           = NodeId,
             FullName     = Text,
             Path         = UserCtrlPath,
             Description  = Description,
             ControlId    = ControlId,
             Type         = Type,
             FormName     = FormName,
             AssemblyName = AssemblyName
         };
         RDIFrameworkService.Instance.WorkFlowUserControlService.UpdateUserControl(SystemInfo.UserInfo, entity);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }