ningshuxia
2023-06-27 d5a533d045422407c1b7edfdde9fd19740e478d1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace IStation.DAL
{
    /// <summary>
    /// 
    /// </summary>
    public partial class CorpDAL_TreeSorter_UseStatus<T> : CorpDAL_TreeSorter<T> where T : Entity.CorpEntity,Entity.ITreeSorter,Entity.IUseStatus,new()
    {
        /// <summary>
        /// 更新使用状态
        /// </summary>
        public virtual bool UpdateUseStatus(long CorpID, long ID, int UseStatus)
        {
            using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig))
            {
                return db.Updateable<T>().SetColumns(x => x.UseStatus == UseStatus).Where(x => x.CorpID == CorpID && x.ID == ID).ExecuteCommand() > 0;
            }
        }
    }
}