📄 fjlx.cs
字号:
using System;
using System.Data;
using System.Windows.Forms;
namespace bggl.cs
{
/// <summary>
/// fjlx 的摘要说明。
/// </summary>
public class fjlx
{
conn.conn con=new conn.conn();
DataSet objset;
string fjlxz="";
string yj="";
public fjlx()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public DataSet selectexeshu()
{
string selectsql="select xname from BG_FJLX";
try
{
objset=con.selectexe(selectsql,"BG_FJLX");
}
catch(Exception e)
{
MessageBox.Show(e.ToString());
}
return objset;
}
public DataSet selectexe()
{
string selectsql="select * from BG_FJLX";
try
{
objset=con.selectexe(selectsql,"BG_FJLX");
}
catch(Exception e)
{
MessageBox.Show(e.ToString());
}
return objset;
}
public bool insertexe(string xname,string qian,string zd,string xyj,string xzs)
{
string sqlins="insert into BG_FJLX values('"+xname+"',"+qian+","+zd+","+xyj+",'"+xzs+"')";
try
{
return con.execomm(sqlins);
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
return false;
}
}
public bool upexe(string id,string xname,string qian,string zd,string xyj,string xzs)
{
string upsql="update BG_FJLX set xname='"+xname+"',xjg="+qian+",xzdj="+zd+",xzs='"+xzs+"',xyj="+xyj+" where xid="+id+"";
try
{
return con.execomm(upsql);
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
return false;
}
}
public bool delexe(string del)
{
string delsql="delete from BG_FJLX where xid="+del+"";
try
{
return con.execomm(delsql);
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
return false;
}
}
//根据房间类型和是否钟点房查找价钱
public string jq(string fjlx,string zt){
if(zt!="1")
{
objset=con.selectexe("select xjg from BG_FJLX where xname='"+fjlx+"' ","BG_FJLX");
}
else{
objset=con.selectexe("select xzdj from BG_FJLX where xname='"+fjlx+"' ","BG_FJLX");
}
foreach(DataRow dr in objset.Tables[0].Rows)
{
fjlxz=dr[0].ToString().Trim();
}
return fjlxz;
}
public string yjdc(string fjlx)
{
objset=con.selectexe("select xyj from BG_FJLX where xname='"+fjlx+"' ","BG_FJLX");
foreach(DataRow dr in objset.Tables[0].Rows)
{
yj=dr[0].ToString().Trim();
}
return yj;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -