Song.ServiceImpls/VoteCom.cs
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using WeiSha.Common;
using Song.Entities;
using WeiSha.Data;
using Song.ServiceInterfaces;
using System.Data.Common;
namespace Song.ServiceImpls
{
public class VoteCom : IVote
{
//图片上传的路径
private string _uppath = "Vote";
#region 调查主题的操作
/// <summary>
/// 添加
/// </summary>
/// <param name="entity">业务实体</param>
public int ThemeAdd(Vote entity)
{
entity.Vt_CrtTime = DateTime.Now;
entity.Vt_IsTheme = true;
object obj = Gateway.Default.Max<Vote>(Vote._.Vt_Tax, Vote._.Vt_IsTheme == true);
if (obj != DBNull.Value)
{
entity.Vt_Tax = Convert.ToInt32(obj) + 1;
}
else
{
entity.Vt_Tax = 1;
}
Song.Entities.Organization org = Business.Do<IOrganization>().OrganCurrent();
if (org != null)
{
entity.Org_ID = org.Org_ID;
entity.Org_Name = org.Org_Name;
}
return Gateway.Default.Save<Vote>(entity);
}
/// <summary>
/// 修改
/// </summary>
/// <param name="entity">业务实体</param>
public void ThemeSave(Vote entity)
{
Gateway.Default.Save<Vote>(entity);
}
/// <summary>
/// 删除
/// </summary>
/// <param name="entity">业务实体</param>
public void ThemeDelete(Vote entity)
后面还有 220 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
