?? zdbsql.cs
字號:
using System;
using System.Data;
using System.Windows.Forms;
namespace bggl.cs
{
/// <summary>
/// zdbsql 的摘要說明。
/// </summary>
public class zdbsql
{
conn.conn con=new bggl.conn.conn();
DataSet objset;
string zdh="";
public zdbsql()
{
//
// TODO: 在此處添加構造函數邏輯
//
}
public bool insertexe(string fid,string flx,string kname,string ksf,string krs,string krzrq,string klksj,string kvipkh,string kfjjg,string ksjsf,string kczy,string kzs)
{
string inssql="insert into BG_ZDB values('"+fid+"','"+flx+"','"+kname+"','"+ksf+"','"+krs+"','"+krzrq+"','"+klksj+"','"+kvipkh+"',"+kfjjg+","+ksjsf+",'"+kczy+"','"+kzs+"')";
try
{
return con.execomm(inssql);
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
return false;
}
}
public string selectexe()
{
string selectsql="select top 1 zid from BG_ZDB zid order by zid desc";
try
{
objset=con.selectexe(selectsql,"BG_YDB");
foreach(DataRow dr in objset.Tables[0].Rows){
zdh=dr[0].ToString();
}
}
catch(Exception e)
{
MessageBox.Show(e.ToString());
}
return zdh;
}
public DataSet selectprint(string fromdate,string todate)
{
string str="select * from BG_ZDB where klksj>'"+fromdate+"'and klksj<'"+todate+"' ";
try
{
objset=con.selectexe(str,"BG_ZDB");
}
catch(Exception e)
{
MessageBox.Show(e.ToString());
}
return objset;
}
public DataSet selectexez(string id)
{
string str="select * from BG_ZDB where zid="+id+"";
try
{
objset=con.selectexe(str,"BG_ZDB");
}
catch(Exception e)
{
MessageBox.Show(e.ToString());
}
return objset;
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -