KTVDB.cs
资源名称:KTV.rar [点击查看]
上传用户:fzwcsgshou
上传日期:2022-07-30
资源大小:28414k
文件大小:5k
源码类别:
行业应用
开发平台:
Visual C++
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Data;
- using System.Data.SqlClient;
- namespace KTVData
- {
- public class KTVDB
- {
- public static string GeQuName = "";
- public static int GeQuID = 0;
- public static string YuYan = "";
- public static string ClassName = "";
- public static string PinYin = "";
- public static string DiZhi = "";
- public static int CiShu = 0;
- public static string GeShouName = "";
- public static string Sex = "";
- public static int GeShouID = 0;
- public static string GeShouDiQu = "";
- public static string UserName = "";
- public static DataSet SelectZiMu(string ZiMu)
- {
- return DBexec.Select("SelectZiMu '" + ZiMu + "'," + GeShouID);
- }
- public static DataSet SelectClassName(string ClassName)
- {
- return DBexec.Select("SelectLeiXin '" + ClassName + "'");
- }
- public static DataSet SelectDiQu(string DiQu,string Sex)
- {
- return DBexec.Select("SelectDiQu '" + DiQu + "','" + Sex + "'");
- }
- public static DataSet SelectGeQu(string SName, string RName, string ClassName, string YuYan)
- {
- return DBexec.Select("SelectZongHe '" + SName + "','" + RName + "','" + ClassName + "','" + YuYan + "'");
- }
- public static DataSet SelectGeShouDeGe(int RID)
- {
- return DBexec.Select("SelectGeShouDeGe " + RID);
- }
- public static DataSet SelectPaiHangBang()
- {
- return DBexec.Select("SelectPaiHangBang");
- }
- public static DataSet SelectZiShu(int ZiShu)
- {
- return DBexec.Select("SelectZiShu " + ZiShu);
- }
- public static DataSet SelectOneGeQu(int SID)
- {
- return DBexec.Select("SelectOneGeQu " + SID);
- }
- public static DataSet SelectGeShou(string DiQu, string Sex)
- {
- return DBexec.Select("SelectGeShou 0,'"+DiQu+"','"+Sex+"'");
- }
- public static DataSet SelectGeShou(int RID)
- {
- return DBexec.Select("SelectGeShou " + RID);
- }
- public static DataSet SelectGeShouName(string RName)
- {
- return DBexec.Select("SelectGeShouName '" + RName + "'");
- }
- public static bool DianBo(int SID)
- {
- return DBexec.exec("DianBo "+SID);
- }
- public static DataSet SelectYuYan(string YuYan)
- {
- return DBexec.Select("SelectYuYan '" + YuYan + "'");
- }
- public static bool AdminGeQu(int SID,string SName, string YuYan, string ClassName, int RID, string PinYin, int CiShu,string DiZhi)
- {
- return DBexec.exec("AdminGeQu " + SID + ",'" + SName + "','" + YuYan + "','" +
- ClassName + "'," + RID +
- ",'" + PinYin + "'," + CiShu + ",'" + DiZhi + "'");
- }
- public static bool AdminGeShou(int RID, string RName, string Sex, string DiQu)
- {
- return DBexec.exec("AdminGeShou " + RID + ",'" + RName + "','" + Sex + "','" + DiQu + "'");
- }
- public static int DelGeQu(int SID)
- {
- return DBexec.exec("DeleteGeQu "+SID, 1);
- }
- public static int DelGeShou(int RID)
- {
- return DBexec.exec("DeleteGeShou " + RID, 1);
- }
- public static DataSet Login(string UserName, string PassWord)
- {
- return DBexec.Select("Login '" + UserName + "','" + PassWord + "'");
- }
- public static int UpdateAdmin(string UserName, string OldUserPWD, string NewUserPWD)
- {
- return DBexec.exec("insertAdmin '" + UserName + "','" + OldUserPWD + "','" + NewUserPWD + "'", 1);
- }
- public static bool InsertAdmin(string UserName, string PassWord)
- {
- if (DBexec.Select("SelectAdmin '" + UserName + "'").Tables[0].Rows.Count < 1)
- {
- return DBexec.exec("insertAdmin '" + UserName + "','" + PassWord + "'");
- }
- else
- {
- return false;
- }
- }
- public static bool ChushiHua(string UserName, string PassWord)
- {
- return DBexec.exec("ChuShiHua '" + UserName + "','" + PassWord + "'");
- }
- public static int DeleteAdmin(string UserName)
- {
- return DBexec.exec("delAdmin '" + UserName + "'", 1);
- }
- }
- }