Example #1
0
        /// <summary>
        /// 新增流程类型
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int AddFlowCategory(FLOW_FLOWCATEGORY entity)
        {
            try
            {
                //string sql = "INSERT INTO FLOW_FLOWCATEGORY ( FLOWCATEGORYID,FLOWCATEGORYDESC) VALUES ('" + entity.FLOWCATEGORYID + "','" + entity.FLOWCATEGORYDESC + "' )";
                //
                //int result = dao.ExecuteNonQuery(sql);
                //return result;

                string insSql = "INSERT INTO FLOW_FLOWCATEGORY (FLOWCATEGORYID,FLOWCATEGORYDESC,COMPANYID) VALUES (:FLOWCATEGORYID,:FLOWCATEGORYDESC,:COMPANYID)";
            Parameter[] pageparm =
                {
                    new Parameter(":FLOWCATEGORYID",GetValue(entity.FLOWCATEGORYID)), //流程分类ID
                    new Parameter(":FLOWCATEGORYDESC",GetValue(entity.FLOWCATEGORYDESC)), //流程分类描述
                     new Parameter(":COMPANYID",GetValue(entity.COMPANYID)) //公司ID

                };
            ParameterCollection pras = new ParameterCollection();
            foreach (var item in pageparm)
            {
                pras.Add(item);
            }
            int result = dao.ExecuteNonQuery(insSql, System.Data.CommandType.Text, pras);
               return result;
            }
            catch (Exception ex)
            {
                Log.WriteLog(this, "AddFlowCategory()", "新增流程类型", ex);
                return 0;
            }
            finally
            {

            }
        }
Example #2
0
 /// <summary>
 /// 修改流程类型
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public int UpdateFlowCategory(FLOW_FLOWCATEGORY entity)
 {
     return flowcategory.UpdateFlowCategory(entity);
 }
Example #3
0
 /// <summary>
 /// 新增流程类型
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public int AddFlowCategory(FLOW_FLOWCATEGORY entity)
 {
     return flowcategory.AddFlowCategory(entity);
 }
Example #4
0
        /// <summary>
        /// 修改流程类型
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int UpdateFlowCategory(FLOW_FLOWCATEGORY entity)
        {
            try
            {
               // string sql = "UPDATE FLOW_FLOWCATEGORY SET FLOWCATEGORYDESC='" + entity.FLOWCATEGORYDESC + "' WHERE FLOWCATEGORYID= '" + entity.FLOWCATEGORYID + "'";

                 string updSql = "UPDATE FLOW_FLOWCATEGORY SET FLOWCATEGORYDESC=:FLOWCATEGORYDESC WHERE   FLOWCATEGORYID=:FLOWCATEGORYID";
                Parameter[] pageparm =
                {
                    new Parameter(":FLOWCATEGORYID",GetValue(entity.FLOWCATEGORYID)), //流程分类ID
                    new Parameter(":FLOWCATEGORYDESC",GetValue(entity.FLOWCATEGORYDESC)) //流程分类描述

                };
                ParameterCollection pras = new ParameterCollection();
                foreach (var item in pageparm)
                {
                    pras.Add(item);
                }
                int result = dao.ExecuteNonQuery(updSql, System.Data.CommandType.Text, pras);
                return result;

            }
            catch (Exception ex)
            {
                Log.WriteLogFrist(this, "UpdateFlowCategory()", "修改流程类型", ex);
                return 0;
            }
            finally
            {

            }
        }