BLL/Base/MBrandMModels.cs

(开头部分) 6KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

namespace BLL.Models
{
    
    public class MBrandMModels
    {
        public string[] str_files = { "ID", "Name", "Content", "Img_Logo", "Img_LogoB", "Intro" };
        /// <summary>
        /// 添加品牌
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool AddBrand(MODEL.MBrand model) {

            bool ret = false;
            string str_sql = "insert into [tb_mc_brand] ( [Name], Content, Img_Logo, Img_LogoB, Intro)values( '"+model.Name+"','"+model.Content+"' ,'"+model.Img_Logo+"' ,'"+model.Img_LogoB+"','"+model.Intro+"' )";
            Library.SqlProvider.SqlServer db = new Library.SqlProvider.SqlServer();
            try
            {
                db.ExecuteNonQuery(COMM.PucConfig.ConnectionStringA, CommandType.Text, str_sql);
                ret = true;
            }
            catch (Exception ex) { }
            return ret;
        }
        /// <summary>
        /// 修改品牌
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdateBrand(MODEL.MBrand model) {

            bool ret = false;
            string str_sql = "update [tb_mc_brand] set Name='"+model.Name+"', Content='"+model.Content+"', Img_Logo='"+model.Img_Logo+"', Img_LogoB='"+model.Img_LogoB+"', Intro='"+model.Intro+"' where id= "+model.Id.ToString();

            Library.SqlProvider.SqlServer db = new Library.SqlProvider.SqlServer();
            try
            {
                db.ExecuteNonQuery(COMM.PucConfig.ConnectionStringA, CommandType.Text, str_sql);
                ret = true;
            }
            catch (Exception ex) { }
            return ret;
        }
        /// <summary>
        /// 删除品牌
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public bool DelBrand(string id) {

            bool ret = false;
            string str_sql = " delete from [tb_mc_brand] where id in("+id+") ";
            Library.SqlProvider.SqlServer db = new Library.SqlProvider.SqlServer();
            try
后面还有 144 行代码,购买后查看完整代码

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

AI 解读 AI

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

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