?? frmttype.cs
字號:
using System;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
namespace bggl.cs
{
/// <summary>
/// frmTtype 的摘要說明。
/// </summary>
public class frmTtype
{
conn.conn tianchong=new bggl.conn.conn();
DataSet objset=new DataSet();
public frmTtype()
{
//
// TODO: 在此處添加構(gòu)造函數(shù)邏輯
//
}
public bool addtype(string type,string shu) //添加
{
try
{
string str=null;
str="insert into BG_CTtype values('"+type+"','"+shu+"')";
tianchong.execomm(str);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
return true;
}
public DataSet seltype() //查詢
{
try
{
objset=tianchong.selectexe("select * from BG_CTtype","BG_CTtype");
}
catch(SqlException ex)
{
MessageBox.Show(ex.Message);
}
return objset;
}
public bool deltype(string type)
{
try
{
string str=null;
str="delete from BG_CTtype where CTqy like '"+type+"'";
tianchong.execomm(str);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
return true;
}
public DataSet cttype()
{
try
{
string str=null;
str="select distinct CTzs from BG_CTtype";
objset=tianchong.selectexe(str,"BG_CTtype");
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
return objset;
}
public bool uptype(int id,string ctqy,string ctzs)
{
try
{
string str=null;
str="update BG_CTtype set CTqy='"+ctqy+"',CTzs='"+ctzs+"' where CTid="+id+"";
tianchong.execomm(str);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
return true;
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -