Пример #1
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 + "'";
                dao.Open();

                string            updSql   = "UPDATE FLOW_FLOWCATEGORY SET FLOWCATEGORYDESC=:FLOWCATEGORYDESC WHERE   FLOWCATEGORYID=:FLOWCATEGORYID";
                OracleParameter[] pageparm =
                {
                    new OracleParameter(":FLOWCATEGORYID", GetValue(entity.FLOWCATEGORYID)),    //流程分类ID
                    new OracleParameter(":FLOWCATEGORYDESC", GetValue(entity.FLOWCATEGORYDESC)) //流程分类描述
                };
                int result = dao.ExecuteNonQuery(updSql, System.Data.CommandType.Text, pageparm);
                return(result);
            }
            catch (Exception ex)
            {
                Log.WriteLogFrist(this, "UpdateFlowCategory()", "修改流程类型", ex);
                return(0);
            }
            finally
            {
                dao.Close();
            }
        }
Пример #2
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 + "' )";
         //dao.Open();
         //int result = dao.ExecuteNonQuery(sql);
         //return result;
         dao.Open();
         string            insSql   = "INSERT INTO FLOW_FLOWCATEGORY (FLOWCATEGORYID,FLOWCATEGORYDESC,COMPANYID) VALUES (:FLOWCATEGORYID,:FLOWCATEGORYDESC,:COMPANYID)";
         OracleParameter[] pageparm =
         {
             new OracleParameter(":FLOWCATEGORYID", GetValue(entity.FLOWCATEGORYID)),     //流程分类ID
             new OracleParameter(":FLOWCATEGORYDESC", GetValue(entity.FLOWCATEGORYDESC)), //流程分类描述
             new OracleParameter(":COMPANYID", GetValue(entity.COMPANYID))                //公司ID
         };
         int result = dao.ExecuteNonQuery(insSql, System.Data.CommandType.Text, pageparm);
         return(result);
     }
     catch (Exception ex)
     {
         Log.WriteLog(this, "AddFlowCategory()", "新增流程类型", ex);
         return(0);
     }
     finally
     {
         dao.Close();
     }
 }
Пример #3
0
 /// <summary>
 /// 修改流程类型
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public int UpdateFlowCategory(FLOW_FLOWCATEGORY entity)
 {
     return(dal.UpdateFlowCategory(entity));
 }
Пример #4
0
 /// <summary>
 /// 新增流程类型
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public int AddFlowCategory(FLOW_FLOWCATEGORY entity)
 {
     return(dal.AddFlowCategory(entity));
 }