public override void Run()
 {
     CStaff staff = new CStaff();
     staff.Id = "admin";
     staff.Name = "admin";
     staff.AdminLevel = AdminLevelType.Admin;
     SmIdentity identity = new SmIdentity(staff);
     SmPrincipal smPrincipal = new SmPrincipal(identity, null, null);
     SecurityUtil.SetSmPrincipal(smPrincipal);
 }
示例#2
0
 private TreeNode AddStaffNode(TreeNodeCollection nc, CStaff staff)
 {
     this.ForceCreateControl();
     if (base.IsHandleCreated)
     {
         return (base.Invoke(new AddNode(this.AddNodeDelegate), new object[] { nc, staff.Name, this.mImageIndexOfStaff, staff, false }) as TreeNode);
     }
     return null;
 }
示例#3
0
 protected override bool DoOk()
 {
     if (this.cmbPoscond.SelectedItem == null)
     {
         MessageHelper.ShowInfo(ResourceService.GetString("Workflow.Message.NoPoscond"));
         return false;
     }
     this.selectedStaffs = this.GetSelectedStaffs();
     if ((this.selectedStaffs != null) && (this.selectedStaffs.Count == 0))
     {
         MessageHelper.ShowInfo("你必须至少选择一个下一活动的经办人!");
         return false;
     }
     if (this.chkStaff.Visible && this.chkStaff.Checked)
     {
         this.selectedStaff = (CStaff) this.cmbStaff.SelectedItem;
     }
     else
     {
         this.selectedStaff = null;
     }
     Transition selectedItem = (Transition) this.cmbPoscond.SelectedItem;
     foreach (SkyMap.Net.Workflow.XPDL.Condition condition in selectedItem.Conditions)
     {
         string str;
         string type = condition.Type;
         if (((type != null) && (type == "SQL")) && !this.SQLConditionEval(condition.Xpression, out str))
         {
             MessageHelper.ShowInfo(str);
             return false;
         }
     }
     return true;
 }