Snailsoft.CRM.DB/CRM/DB/FeedbacktypeDB.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace Snailsoft.CRM.DB
{
    using System;
    using System.Data;
    using Snailsoft.Common.Database;
    using Snailsoft.CRM.DB.Data;
    using Snailsoft.Utils;

    public class FeedbacktypeDB : BaseDB
    {
        public FeedbacktypeDB(DBOperate oper) : base(oper)
        {
        }

        public bool Add(FeedbacktypeDT detail)
        {
            int affected = 0;
            string sql = string.Concat(new object[] { "INSERT INTO feedbackType (typeID,fbakName,fbakDesc,score) VALUES (", detail.typeID, ",'", StringUtils.EscapeHtml(StringUtils.ToSQL(detail.fbakName)), "','", StringUtils.EscapeHtml(StringUtils.ToSQL(detail.fbakDesc)), "',", detail.score, ")" });
            try
            {
                affected = base.ExecuteForInt(sql);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return (affected == 1);
        }

        public bool Delete(int typeID)
        {
            int affected = 0;
            string sql = "DELETE FROM feedbackType where (typeID=" + typeID + ")";
            try
            {
                affected = base.ExecuteForInt(sql);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return (affected == 1);
        }

        public bool Edit(FeedbacktypeDT detail)
        {
            int affected = 0;
            string sql = string.Concat(new object[] { "UPDATE feedbackType set typeID=", detail.typeID, ",fbakName='", StringUtils.EscapeHtml(StringUtils.ToSQL(detail.fbakName)), "',fbakDesc='", StringUtils.EscapeHtml(StringUtils.ToSQL(detail.fbakDesc)), "',score=", detail.score, " where (typeID=", detail.typeID, ")" });
            try
            {
                affected = base.ExecuteForInt(sql);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return (affected == 1);
        }

        public FeedbacktypeDT Get(int typeID)
后面还有 40 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。