protected void Btn_SaveAndClose_Click(object sender, EventArgs e) { Node nd = new Node(this.FK_Node); BP.WF.Template.FrmNode fn = new BP.WF.Template.FrmNode(nd.FK_Flow, nd.NodeID, this.FK_MapData); if (this.RB_0.Checked) { fn.FrmEnableRole = BP.WF.Template.FrmEnableRole.Allways; } if (this.RB_1.Checked) { fn.FrmEnableRole = BP.WF.Template.FrmEnableRole.WhenHaveData; } if (this.RB_2.Checked) { fn.FrmEnableRole = BP.WF.Template.FrmEnableRole.WhenHaveFrmPara; } if (this.RB_3.Checked) { fn.FrmEnableRole = BP.WF.Template.FrmEnableRole.ByFrmFields; } if (this.RB_4.Checked) { fn.FrmEnableRole = BP.WF.Template.FrmEnableRole.BySQL; fn.FrmEnableExp = this.TB_SQL.Text; } if (this.RB_5.Checked) { fn.FrmEnableRole = BP.WF.Template.FrmEnableRole.Disable; } fn.Update(); BP.Sys.PubClass.WinClose(fn.FrmEnableRoleText); //BP.Sys.PubClass.WinCloseAndAlertMsg("保存成功."); }
/// <summary> /// 生成各FK_MapData对应的权限控制json字符串,应用于前端JS控制相应的显示 /// </summary> private void GenerateToolbarSlns() { BP.WF.Template.FrmNode fn = null; ToolbarExcelSln toobarsln = null; ToolbarSlns = "["; foreach (var fk_mapdata in fk_mapdatas) { ToolbarSlns += "{\"" + fk_mapdata + "\":"; if (string.IsNullOrEmpty(this.FK_Flow) == false) { /*接受到了流程编号,就要找到他的控制方案.*/ fn = new BP.WF.Template.FrmNode(this.FK_Flow, this.FK_Node, fk_mapdata); if (fn.FrmSln == 1) { /* 如果是自定义方案.*/ toobarsln = new ToolbarExcelSln(this.FK_Flow, this.FK_Node, fk_mapdata); toolbar.Row = toobarsln.Row; } else { //非自定义方案就取默认方案. toolbar = new ToolbarExcel(fk_mapdata); } } else { /*没有找打他的控制方案,就取默认方案.*/ toolbar = new ToolbarExcel(fk_mapdata); } ToolbarSlns += GetToolbarSlnJsonString(toolbar) + "},"; } ToolbarSlns = ToolbarSlns.TrimEnd(',') + "]"; }
protected void Page_Load(object sender, EventArgs e) { if (this.IsPostBack == false) { Node nd = new Node(this.FK_Node); BP.WF.Template.FrmNode fn = new BP.WF.Template.FrmNode(nd.FK_Flow, nd.NodeID, this.FK_MapData); switch (fn.FrmEnableRole) { case BP.WF.Template.FrmEnableRole.Allways: this.RB_0.Checked = true; break; case BP.WF.Template.FrmEnableRole.WhenHaveData: this.RB_1.Checked = true; break; case BP.WF.Template.FrmEnableRole.WhenHaveFrmPara: this.RB_2.Checked = true; break; case BP.WF.Template.FrmEnableRole.ByFrmFields: this.RB_3.Checked = true; break; case BP.WF.Template.FrmEnableRole.BySQL: this.RB_4.Checked = true; this.TB_SQL.Text = fn.FrmEnableExp; break; case BP.WF.Template.FrmEnableRole.Disable: this.RB_5.Checked = true; break; default: throw new Exception("@没有判断的模式."); } } }