コード例 #1
0
        public override void SetAccess(FormM form, DFDictionary entity)
        {
            var page = ((this.Parent as ucForm).Page as DFIndexWF);
            var list = InstanceStepExecutorDAO.QueryUnfinishedByInstanceId(entity["InstanceId"]);

            if (list.Count == 0)
            {
                form.GetControlM("btnRemind").Remove();
            }
            // 1 保存 2 提交 3 同意 4 不同意 5 回退 6 转签 7 加签
            var result = GetAccess(form, entity);

            if ((result & 1) <= 0)
            {
                form.GetControlM("btnSave").Remove();
                if (page != null)
                {
                    page.UcForm1.Form.GetControlMs_Like("btnEdit").ForEach(a => a.Remove());
                    page.UcForm1.Form.GetControlMs_Like("btnUpdate").ForEach(a => a.Remove());
                    page.UcForm1.Form.GetControlMs_Like("btnDelete").ForEach(a => a.Remove());
                    page.UcForm1.Form.GetControlMs_Like("btnAdd").ForEach(a => a.Remove());
                    page.UcForm1.Form.GetControlMs_Like("btnUpload").ForEach(a => a.Remove());
                }
            }
            if ((result & 2) <= 0)
            {
                form.GetControlM("btnSubmit").Remove();
            }
            if ((result & 4) <= 0)
            {
                form.GetControlM("btnApprove").Remove();
            }
            if ((result & 8) <= 0)
            {
                form.GetControlM("btnReject").Remove();
            }
            if ((result & 16) <= 0)
            {
                form.GetControlM("btnRollback").Remove();
            }
            if ((result & 32) <= 0)
            {
                form.GetControlM("btnTransferApprove").Remove();
            }
            if ((result & 64) <= 0)
            {
                form.GetControlM("btnAdditionalApprove").Remove();
            }
            base.SetAccess(form, entity);
        }
コード例 #2
0
        public DataGridVM Remind(DFDictionary dict)
        {
            ArgumentCheck.CheckMustInput(dict, "InstanceId");
            var user = Util.GetCurrentUser();
            var list = InstanceStepExecutorDAO.QueryUnfinishedByInstanceId(dict["InstanceId"]);

            foreach (var item in list)
            {
                ExecutorImp.SendMessage(item.InstanceStepExecutorId, user.UserName);
            }
            return(new DataGridVM()
            {
                data = "催签成功!".GetRes()
            });
        }