Beispiel #1
0
        /// <summary>
        /// 工作流触发
        /// </summary>
        public void WorkflowTrigger()
        {
            string workflowAction = ctx.Request["workflowAction"];      //工作流动作
            string role           = ctx.Request["role"];                //工作流角色
            int    entityID       = int.Parse(ctx.Request["entityID"]); //数据ID
            string state          = ctx.Request["state"];               //工作流当前状态

            Workflow.ActionTrigger("UserInfo", workflowAction, role, entityID, state);
        }
Beispiel #2
0
        /// <summary>
        /// 插入用户信息
        /// </summary>
        /// <param name="userInfo">userinfo对象</param>
        /// <returns></returns>
        public int InsertUserInfo(UserInfo userInfo, string role)
        {
            string commandText = "InsertUserInfo";

            SqlParameter[] paras = new SqlParameter[] {
                new SqlParameter("@userName", userInfo.UserName),
                new SqlParameter("@password", userInfo.Password)
            };
            try
            {
                int userInfoID = (Int32)SqlHelper.ExecuteSaclar(CommandType.StoredProcedure, commandText, paras);
                Workflow.ActionTrigger("UserInfo", "Insert", role, userInfoID);
                return(1);
            }
            catch (Exception e)
            {
                return(0);
            }
        }