?? glysql.cs
字號:
using System;
using System.Data.SqlClient;
using System.Data;
using System.Windows.Forms;
namespace bggl.cs
{
/// <summary>
/// gly 的摘要說明。
/// </summary>
public class glysql
{
conn.conn con=new bggl.conn.conn();
DataSet objset;
public glysql()
{
//
// TODO: 在此處添加構造函數邏輯
//
}
public bool insertexe(string name,string pass,string qx){
string sqlins="insert into BG_GLY values('"+name+"','"+pass+"','"+qx+"')";
try
{
return con.execomm(sqlins);
}
catch(Exception ex){
MessageBox.Show(ex.ToString());
return false;
}
}
public DataSet selectexe(){
string sqlselect="select gid 管理員ID,gname 管理員名,gpass 管理員密碼,gqx 管理員權限 from BG_GLY";
try
{
return objset=con.selectexe(sqlselect,"gly");
}
catch(Exception e){
MessageBox.Show(e.ToString());
}
return objset;
}
public DataSet selectexe1(int i)
{
string sqlselect="select * from BG_GLY where gid="+i+"";
try
{
objset=con.selectexe(sqlselect,"gly");
}
catch(Exception e)
{
MessageBox.Show(e.ToString());
}
return objset;
}
public bool delexe(string del){
string delsql="delete from BG_GLY where gid="+del+"";
try
{
return con.execomm(delsql);
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
return false;
}
}
public bool upexe(string name,string pass,string qx,int gid)
{
string upsql="update BG_GLY set gname='"+name+"',gpass='"+pass+"',gqx='"+qx+"' where gid="+gid+"";
try
{
return con.execomm(upsql);
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
return false;
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -