cclassCheckLogin
{
publicCheckLogin()
{
//
//TODO:在此处添加构造函数逻辑
//
}
publicintGiveID(stringUserName,stringPassWord)
{
SqlDataBaseThisB=newSqlDataBase();
stringCheckSql="selectcount(*)fromUserListwhereUserName='"+UserName+"'andPassWord='"+PassWord+"'";
intThisNum=Convert.ToInt32(ThisB.ReturnSQL(CheckSql));
if(ThisNum>0)
{
stringSqlType="select*fromUserListwhereUserName='"+UserName+"'andPassWord='"+PassWord+"'";
SqlDataReaderThRead=ThisB.GRead(SqlType);
while(ThRead.Read())
{
returnConvert.ToInt32(ThRead["ID"]);
}
}
return0;
}
publicstaticboolCheckAdmin(intUserID)
{
SqlDataBaseMyDb=newSqlDataBase();
stringLog=Convert.ToString(MyDb.ReturnSQL("selectUserTypefromUserListWhereID='"+UserID+"'"));
if(Log=="1")
{
returntrue;
}
else
{
returnfalse;
}
}
publicstaticintGiveCheckAd(intUserID)
{
SqlDataBaseMyDb=newSqlDataBase();
intLog=Convert.ToInt32(MyDb.ReturnSQL("selectGoodsTypefromUserListWhereID='"+UserID+"'"));
returnLog;
}
publicstaticDataTableGiveMsgGod(intUserID)//返回对应仓库的数量超限产品
{
SqlDataBaseMyDb=newSqlDataBase();
intLog=Convert.ToInt32(MyDb.ReturnSQL("selectControlsfromUserListWhereID='"+UserID+"'"));
stringSqlString="";
if(Log==0)
{
SqlString="select*fromView_GoodMsg";
}
else
{
SqlString="select*fromView_GoodMsgwhereID='"+Log+"'";
}
returnMyDb.DT(SqlString);
}
publicstaticboolCheckKeepAdmin(intUserID)
{
SqlDataBaseMyDb=newSqlDataBase();
stringLog=Convert.ToString(MyDb.ReturnSQL("selectGoodsTypefromUserListWhereID='"+UserID+"'"));
if(Log=="0")
{
returntrue;
}
else
{
returnfalse;
}
}
}
admin.cs类,管理员操作文件所有程序如下:
usingSystem;
usingSystem.Data;
usingSystem.Data.SqlClient;
usingSystem.Configuration;
usingSystem.Web;
usingSystem.Web.Security;
usingSystem.Web.UI;
usingSystem.Web.UI.WebControls;
usingSystem.Web.UI.WebControls.WebParts;
usingSystem.Web.UI.HtmlControls;
///
///admin的摘要说明
///
publicclassadmin
{
publicadmin()
{
//
//TODO:在此处添加构造函数逻辑
//
}
publicvoidInsertSystemT(stringTital,stringCount)
{
stringDtime=DateTime.Now.ToString();
stringMySql="InsertIntoSystemTest(Tatile,Counts,InputTime,TestType)Values('"+Tital+"','"+Count+"','"+Dtime+"','0')";
SqlDataBaseMyDb=newSqlDataBase();
MyDb.NoreturnSql(MySql);
}
publicstaticvoidInsertBigCl(stringBigNam)//添加大类
{
SqlDataBaseMyDb1=newSqlDataBase();
MyDb1.NoreturnSql("InsertIntoBigClass(GoodsName)Values('"+BigNam+"')");
}
publicstaticDataTableGetKeepG()//获得货架个数
{
SqlDataBaseMyDb=newSqlDataBase();
returnMyDb.DT("selectID,GoodClassfromKeepNum");
}
publicstaticvoidInsertGds(stringGoodN,stringGoodNam,stringTopNum,stringEndNum,stringAlignGoodC,stringAlignKeeps,stringAlignType)
{
SqlDataBaseMyDb=newSqlDataBase();
MyDb.NoreturnSql("InsertintoAllGood(GoodsNum,GoodsName,TopNum,EndNum,AlignGoodC,AlignKeeps,AlignType)Values('"+GoodN+"','"+GoodNam+"','"+TopNum+"','"+EndNum+"','"+AlignGoodC+"','"+AlignKeeps+"','"+AlignType+"')");
}
}
??
??
??
??
摘要
车辆与动力工程学院毕业设计说明书
IV
I
目录
错误!未找到引用源。错误!未找到引用源。
错误!未找到引用源。错误!未找到引用源。
6
7
第3章标题
8
12
错误!未找到引用源。错误!未找到引用源。
错误!未找到引用源。错误!未找到引用源。
28
参考文献
54
附 录
16
上一篇:
ASP_net通用作业批改系统设计+论文(论文和程序)
下一篇:
记录文件6:基于IOS的易车新闻客户端