using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DataLinkMesWork;
//using SystemFramework;
namespace bizFacade
{
public partial class BaseDataSystemMES
{
///
/// MES_操作者_登录_增加
///
///
///
public static void UserNameLoginInsert(string opName,string userName)
{
string procedureName;
procedureName = "MES_操作者_登录_增加";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@操作者工号", userName);
DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
}
///
/// MES_操作者_用户_增加 2013-01-23 王可心
///
///
///
static public bool UserNameTableInsert(string userName, string user)
{
string procedureName;
procedureName = "MES_操作者_用户_增加";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@操作者工号", userName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@操作者姓名", user);
return DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
}
///
/// MES_操作者_用户_修改
///
///
///
///
public static void UserNameTableUpdate(string userName,string password,string passwordNew)
{
string sql;
sql = "exec MES_操作者_用户_修改 '" + userName + "','" + password + "','"+passwordNew+"'";
DataAccess.ExecuteSQL(sql);
}
///
/// MES_操作者_用户_设置初始秘密
///
///
static public bool UserNameTableUpdateInitPassword(string userName)
{
string procedureName;
procedureName = "MES_操作者_用户_设置初始秘密";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@操作者工号", userName);
return DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
}
///
/// MES_操作者_用户_查询
/// 执行后,返回count(*)
///
///
///
public static int UserNameTableSelect(string userName, string password)
{
int count;
string sql;
sql = "exec MES_操作者_用户_查询 '"+ userName + "','" + password + "'";
DataAccess.ExecuteOutNum(sql, out count);
return count;
}
///
/// MES_操作者_用户_增加用_查询
/// 执行后,返回count(*)
///
///
public static int UserNameTableSelectForInsert(string userName)
{
int count;
string sql;
sql = "exec MES_操作者_用户_增加用_查询 '" + userName + "'";
DataAccess.ExecuteOutNum(sql, out count);
return count;
}
///
/// MES_操作者_用户_删除 2013-01-23 王可心 删除该用户
///
/// 用户工号
static public bool UserNameTableSelectForDelete(string userName)
{
string procedureName;
procedureName = "MES_操作者_用户_删除";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@操作者工号", userName);
return DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
}
///
/// MES_操作者_用户_姓名_修改 2013-01-23 王可心
///
///
///
static public bool UserNameTableAlter(string userName, string user)
{
string procedureName;
procedureName = "MES_操作者_用户_姓名_修改";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@操作者工号", userName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@操作者姓名", user);
return DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
}
}
}