📄 popedomfunctiondb.cs
字号:
//************************************************************
//项目:学生学籍管理系统
//版权:Copyright(c) ,TZZ
//模块名:基础数据模块
//说明:PopedomFunction基础类
//版本:1.0
//修改历史:
// 2006-6-7 BY Gawain
// 初始版本
//*****************************************************************
using System;
using System.Data;
using System.Data.SqlClient;
using System.Reflection;
using QSEDUNET.MODEL.BaseInfo;
using QSEDUNET.COMMAND;
namespace QSEDUNET.DATALABLE.BaseInfo
{
public class PopedomFunctionDB : SqlDBBaseConnection
{
public PopedomFunctionDB() { }
public PopedomFunctionDB(SqlConnection objCon) : base(objCon) { }
public PopedomFunctionDB(SqlConnection objCon, SqlTransaction objTrans) : base(objCon, objTrans) { }
/// <summary>
/// 新建数据
/// </summary>
public int NewPopedomFunction(PopedomFunctionModel objPopedomFunctionModel)
{
try
{
SqlParameter[] parameters =
{
new SqlParameter( "@UserPopedom_Function_ID",SqlDbType.Int),
new SqlParameter( "@UserPopedom_ID",SqlDbType.Int),
new SqlParameter( "@UserFunction_ID",SqlDbType.Int),
new SqlParameter( "@UserPopedom_Function_Msg",SqlDbType.NVarChar,100),
};
parameters[0].Direction = ParameterDirection.Output;
parameters[1].Value = objPopedomFunctionModel.UserPopedom_ID;
parameters[2].Value = objPopedomFunctionModel.UserFunction_ID;
parameters[3].Value = objPopedomFunctionModel.UserPopedom_Function_Msg;
StroedProdedure("SP_UserPopedom_UserFunction_Insert", parameters);
int returnValue = Run();
return returnValue;
}
catch (Exception ex)
{
throw (ex);
}
finally
{
CommandDispose();
}
}
/// <summary>
/// 修改数据
/// </summary>
public bool UpPopedomFunction(PopedomFunctionModel objPopedomFunctionModel)
{
try
{
SqlParameter[] parameters =
{
new SqlParameter( "@UserPopedom_Function_ID",SqlDbType.Int),
new SqlParameter( "@UserPopedom_ID",SqlDbType.Int),
new SqlParameter( "@UserFunction_ID",SqlDbType.Int),
new SqlParameter( "@UserPopedom_Function_Msg",SqlDbType.NVarChar,100),
};
parameters[0].Value = objPopedomFunctionModel.UserPopedom_Function_ID;
parameters[1].Value = objPopedomFunctionModel.UserPopedom_ID;
parameters[2].Value = objPopedomFunctionModel.UserFunction_ID;
parameters[3].Value = objPopedomFunctionModel.UserPopedom_Function_Msg;
StroedProdedure("SP_UserPopedom_UserFunction_Updata", parameters);
bool returnValue = Run("upData");
return returnValue;
}
catch (Exception ex)
{
throw (ex);
}
finally
{
CommandDispose();
}
}
/// <summary>
/// 删除数据
/// </summary>
public int DelPopedomFunction(int inValue, string tab)
{
try
{
string sql = "";
switch (tab)
{
case "Popedom":
sql = "delete from T_UserPopedom_UserFunction where UserPopedom_ID = " + inValue;
break;
case "Function":
sql = "delete from T_UserPopedom_UserFunction where UserFunction_ID = " + inValue;
break;
default:
sql = "delete from T_UserPopedom_UserFunction where UserFunction_ID = -1";
break;
}
int returnValue = RunSQL(sql);
return returnValue;
}
catch (Exception ex)
{
throw (ex);
}
finally
{
CommandDispose();
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -