Пример #1
0
 /// <summary>
 /// 删除子表单隶属的组关系
 /// </summary>
 /// <param name="userControlId"></param>
 /// <returns></returns>
 public static int DeleteMainCtrlsOfUser(string userControlId)
 {
     if (userControlId.Trim().Length == 0 || userControlId == null)
         throw new Exception("DeleteMainCtrlsOfUser方法错误,userControlId 不能为空!");
     try
     {
         string sqlStr = "delete from UserControlsLink where userControlId=@userControlId";
         SqlDataItem sqlItem = new SqlDataItem();
         sqlItem.CommandText = sqlStr;
         sqlItem.AppendParameter("@userControlId", userControlId);
         ClientDBAgent agent = new ClientDBAgent();
         return agent.ExecuteNonQuery(sqlItem);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #2
0
        /// <summary>
        /// 获得子表单隶属的主表单
        /// </summary>
        /// <returns></returns>
        public static DataTable GetMainCtrlsOfChild(string userControlId)
        {
            try
            {
                string tmpStr = "select * from UserControlsView where UserControlId=@UserControlId order by mucCaption";
                SqlDataItem sqlItem = new SqlDataItem();
                sqlItem.CommandText = tmpStr;
                sqlItem.AppendParameter("@userControlId", userControlId);
                ClientDBAgent agent = new ClientDBAgent();
                return agent.ExecuteDataTable(sqlItem);

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #3
0
        /// <summary>
        /// 设置流程分类
        /// </summary>
        /// <param name="workflowId">流程模板Id</param>
        /// <param name="wfclassid">流程分类Id</param>
        /// <returns></returns>
        public static int SetWorkflowClass(string workflowId,string wfclassid)
        {
            try
            {
                string tmpSql = "update workflow set wfclassId=@wfclassid where WorkFlowId=@workflowId";
                SqlDataItem sqlItem = new SqlDataItem();
                sqlItem.CommandText = tmpSql;
                sqlItem.AppendParameter("@workflowId", workflowId);
                sqlItem.AppendParameter("@wfclassid", wfclassid);
                ClientDBAgent agent = new ClientDBAgent();
                return agent.ExecuteNonQuery(sqlItem);

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #4
0
        public static bool Exists(string workFlowid)
        {
            string tmpSql = "select * from workflow where workflowId=@workFlowid";
            SqlDataItem sqlItem = new SqlDataItem();
            sqlItem.AppendParameter("@workFlowid", workFlowid);
            sqlItem.CommandText = tmpSql;
            ClientDBAgent agent = new ClientDBAgent();
            return agent.RecordExists(sqlItem);

        }
Пример #5
0
 /// <summary>
 /// 获得工作流模板信息
 /// </summary>
 /// <param name="workflowId">流程模板名称</param>
 /// <returns></returns>
 public static DataTable GetWorkflowsByCaption(string workflowCaption)
 {
    
     string tmpStr = "select * from workflow where FlowCaption like @workflowCaption";
     try
     {
         SqlDataItem sqlItem = new SqlDataItem();
         sqlItem.CommandText = tmpStr;
         sqlItem.AppendParameter("@workflowCaption", "%" + workflowCaption + "%");
         ClientDBAgent agent = new ClientDBAgent();
         return agent.ExecuteDataTable(sqlItem);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #6
0
 public static DataTable GetWorkFlowAllControlsTable(string workflowId)
 {
     try
     {
         string tmpStr = "select  * from worktaskControls where WorkFlowId=@workflowId";
         SqlDataItem sqlItem = new SqlDataItem();
         sqlItem.CommandText = tmpStr;
         sqlItem.AppendParameter("@workflowId", workflowId);
         ClientDBAgent agent = new ClientDBAgent();
         return agent.ExecuteDataTable(sqlItem);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #7
0
 public static int DeleteWorkFlow(string workflowId)
 {
     if (workflowId.Trim().Length == 0 || workflowId == null)
         throw new Exception("DeleteWorkFlow方法错误,workflowId 不能为空!");
     try
     {
         SqlDataItem sqlItem = new SqlDataItem();
         sqlItem.CommandText = "DeleteWorkflow";
         sqlItem.CommandType = CommandType.StoredProcedure;
         sqlItem.AppendParameter("@WorkflowId", workflowId);
         ClientDBAgent agent = new ClientDBAgent();
         return agent.ExecuteNonQuery(sqlItem);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }