Snailsoft.CRM.DB/CRM/DB/CusDefDB.cs

(开头部分) 4KB

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

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

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

        public bool Add(CusDefDT detail)
        {
            int affected = 0;
            string sql = "INSERT INTO customerDefine (cusDefID,chinName,engName,coluType,showType,decimalNum,allowNull,descRowsNum,descCellsNum,rowsNum,cellsNum,startRow,startCell) VALUES (" + detail.cusDefID.ToString() + ",'" + StringUtils.EscapeHtml(StringUtils.ToSQL(detail.chinName)) + "','" + StringUtils.EscapeHtml(StringUtils.ToSQL(detail.engName)) + "'," + detail.coluType.ToString() + "," + detail.showType.ToString() + "," + detail.decimalNum.ToString() + "," + detail.allowNull.ToString() + "," + detail.descRowsNum.ToString() + "," + detail.descCellsNum.ToString() + "," + detail.rowsNum.ToString() + "," + detail.cellsNum.ToString() + "," + detail.startRow.ToString() + "," + detail.startCell.ToString() + ")";
            try
            {
                affected = base.ExecuteForInt(sql);
            }
            catch (Exception e)
            {
                throw e;
            }
            return (affected == 1);
        }

        public int AddCusColumn(CusDefDT dt)
        {
            int affected = 0;
            string sql = "ALTER TABLE customer ADD def" + StringUtils.EscapeHtml(StringUtils.ToSQL(dt.engName.Trim())) + " " + this.GetColumnType(dt.coluType) + " NULL";
            try
            {
                affected = base.ExecuteForInt(sql);
            }
            catch (Exception e)
            {
                throw e;
            }
            return affected;
        }

        public int Delete(int cusDefID)
        {
            int affected = 0;
            string sql = "DELETE FROM customerDefine WHERE cusDefID=" + cusDefID.ToString();
            try
            {
                affected = base.ExecuteForInt(sql);
            }
            catch (Exception e)
            {
                throw e;
            }
            return affected;
        }

        public int DeleteCusColumn(string engName)
        {
后面还有 64 行代码,购买后查看完整代码

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

AI 解读

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

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