Beispiel #1
0
        public void AddUser(IList <string> idList, IList <string> userList, string tableName)
        {
            WFprivilegeService service = new WFprivilegeService();

            foreach (string str in userList)
            {
                foreach (string str2 in idList)
                {
                    WFprivilege priv = new WFprivilege {
                        businessClass = str2,
                        userlist      = str
                    };
                    if (!service.Exists(priv))
                    {
                        service.Add(priv);
                    }
                }
            }
        }
Beispiel #2
0
 protected void btnAdd_Click(object sender, System.EventArgs e)
 {
     if (this.txtBookLibraryName.Text == "")
     {
         base.RegisterScript("top.ui.alert('流程名称不能为空'); ");
         return;
     }
     com.jwsoft.pm.entpm.model.WFBusinessClass data = this.GetData();
     if (this.OperateType == "add")
     {
         int         num         = this.mcAction.Add(data);
         WFprivilege wFprivilege = new WFprivilege();
         wFprivilege.businessClass = data.BusinessClass;
         wFprivilege.userlist      = base.UserCode;
         WFprivilegeService wFprivilegeService = new WFprivilegeService();
         wFprivilegeService.Add(wFprivilege);
         if (num > 0)
         {
             string message = "top.ui.show( '保存成功'); \ntop.ui.closeWin(); \ntop.ui.reloadTab(); \n";
             base.RegisterScript(message);
         }
         else
         {
             base.RegisterScript("top.ui.alert('没有相关数据可添加'); ");
         }
     }
     if (this.OperateType == "upd")
     {
         int num = this.mcAction.Update(data);
         if (num > 0)
         {
             string message2 = "top.ui.show( '保存成功'); \ntop.ui.closeWin(); \ntop.ui.reloadTab(); \n";
             base.RegisterScript(message2);
             return;
         }
         base.RegisterScript("top.ui.alert('没有相关数据可更新'); ");
     }
 }
Beispiel #3
0
        public IList <string> GetExistsUser(string id, string tableName)
        {
            WFprivilegeService service = new WFprivilegeService();

            return(service.GetUser(id));
        }