DAL/Models/GZXX_Class.cs

(开头部分) 10KB

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

using DBUtility;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;

namespace DAL.Models
{
    public class GZXX_Class
    {
        public Model.Models.GZXX_Class GetClassInfo(int classid)
        {
            Model.Models.GZXX_Class model = new Model.Models.GZXX_Class();
            SqlParameter[] param = new SqlParameter[] {
                new SqlParameter("@classid",SqlDbType.Int)
            };
            param[0].Value = classid;
            DataTable dt = DbHelperSQL.Query("select * from GZXX_Class where classid=@classid", param).Tables[0];
            if (dt.Rows.Count > 0)
            {
                model.verify = int.Parse(dt.Rows[0]["verify"].ToString());
                model.channelid = int.Parse(dt.Rows[0]["channelid"].ToString());
                model.classid = int.Parse(dt.Rows[0]["classid"].ToString());
                model.classname = dt.Rows[0]["classname"].ToString();
                model.parentclassid = int.Parse(dt.Rows[0]["parentclassid"].ToString());
                model.contenttemplate = dt.Rows[0]["contenttemplate"].ToString();
                model.contentinfotemplate = dt.Rows[0]["contentinfotemplate"].ToString();
                model.intro = dt.Rows[0]["intro"].ToString();
                model.metadescription = dt.Rows[0]["metadescription"].ToString();
                model.metakeywords = dt.Rows[0]["metakeywords"].ToString();
                model.mobileinfotemplate = dt.Rows[0]["mobileinfotemplate"].ToString();
                model.mobiletemplate = dt.Rows[0]["mobiletemplate"].ToString();
                model.classpic = dt.Rows[0]["classpic"].ToString();
                return model;
            }
            else
            {
                return null;
            }
        }

        public int Add(Model.Models.GZXX_Class model) 
        {
            string sql = "insert into GZXX_Class(ChannelID,ClassName,Intro,ContentTemplate,MobileTemplate,ContentInfoTemplate,MobileInfoTemplate,MetaKeyWords,MetaDescription,ParentClassID,ClassPic,Verify) values(@ChannelID,@ClassName,@Intro,@ContentTemplate,@MobileTemplate,@ContentInfoTemplate,@MobileInfoTemplate,@MetaKeyWords,@MetaDescription,@ParentClassID,@ClassPic,@Verify)select @@identity";
            SqlParameter[] param = new SqlParameter[] {
                new SqlParameter("@ChannelID",SqlDbType.Int),
                new SqlParameter("@ClassName",SqlDbType.VarChar),
                new SqlParameter("@Intro",SqlDbType.VarChar),
                new SqlParameter("@ContentTemplate",SqlDbType.VarChar),
                new SqlParameter("@MobileTemplate",SqlDbType.VarChar),
                new SqlParameter("@ContentInfoTemplate",SqlDbType.VarChar),
                new SqlParameter("@MobileInfoTemplate",SqlDbType.VarChar),
                new SqlParameter("@MetaKeyWords",SqlDbType.VarChar),
                new SqlParameter("@MetaDescription",SqlDbType.VarChar),
                new SqlParameter("@ParentClassID",SqlDbType.Int),
                new SqlParameter("@ClassPic",SqlDbType.VarChar),
                new SqlParameter("@Verify",SqlDbType.Int)
            };
            param[0].Value = model.channelid;
后面还有 153 行代码,购买后查看完整代码

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

AI 解读

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

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