DAL/ButtonsService.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using Models;
using DBHelp;
using System.Data;
using System.Data.SqlClient;
namespace DAL
{
public class ButtonsService
{
/// <summary>
/// 增加
/// </summary>
/// <param name="Buttons">Buttons实体对象</param>
/// <returns>bool值,判断是否操作成功</returns>
public bool add(Buttons model)
{
SqlParameter[] param = new SqlParameter[]
{
new SqlParameter ("@Botton_Name",model.Botton_Name),
new SqlParameter ("@Botton_Title",model.Botton_Title),
new SqlParameter ("@Botton_Img",model.Botton_Img),
new SqlParameter ("@Botton_Code",model.Botton_Code),
new SqlParameter ("@Botton_Order",model.Botton_Order),
new SqlParameter ("@Botton_Remak",model.Botton_Remak),
new SqlParameter ("@Botton_Type",model.Botton_Type),
new SqlParameter ("@Botton_Status",model.Botton_Status)
};
return Helper.ExecuteNonQuery("Buttons_Add",param);
}
/// <summary>
/// 增加
/// </summary>
/// <param name="Buttons">Buttons实体对象</param>
/// <returns>int值,返回自增ID</returns>
public int addReturnId(Buttons model)
{
SqlParameter[] param = new SqlParameter[]
{
new SqlParameter ("@Botton_Name",model.Botton_Name),
new SqlParameter ("@Botton_Title",model.Botton_Title),
new SqlParameter ("@Botton_Img",model.Botton_Img),
new SqlParameter ("@Botton_Code",model.Botton_Code),
new SqlParameter ("@Botton_Order",model.Botton_Order),
new SqlParameter ("@Botton_Remak",model.Botton_Remak),
new SqlParameter ("@Botton_Type",model.Botton_Type),
new SqlParameter ("@Botton_Status",model.Botton_Status)
};
return Convert.ToInt32(Helper.ExecuteScalar ("Buttons_AddReturnId",param));
}
/// <summary>
/// 修改
/// </summary>
/// <param name="Buttons">Buttons实体对象</param>
/// <returns>bool值,判断是否操作成功</returns>
public bool change(Buttons model)
{
SqlParameter[] param = new SqlParameter[]
{
后面还有 140 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。