📄 accountaccess.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using Hotel.DAO;
using System.Data;
using Hotel.Entity;
namespace Hotel.Operation
{
public class AccountAccess
{
GetDatabase objGetDatabase = null;
//Account accountEntity = null;
public AccountAccess()
{
objGetDatabase = new GetDatabase();
}
//通过帐号查清单
public DataSet GetAccount(int num)
{
string sql = "select 项目=(select ItemName from ItemsPrice where ItemID="
+"Account.ItemID),单价=(select Price from ItemsPrice where ItemId=Account.ItemID),"
+"数量=ANumber,总价=Consume,折扣=Rebate,实价=EndPrice from Account where RoomUseID=" + num;
DataSet ds = new DataSet();
ds = objGetDatabase.GetDataSet(sql, "Account");
return ds;
}
//添加消费
public int AddAccount(Account ac)
{
string sql = "insert Account values("+ac.RoomUseID+","+ac.ItemID+","
+ac.ANumber+","+ac.Consume+","+ac.Rebate+","+ac.EndPrice+",'"+ac.Remark+"')";
int k = objGetDatabase.ExecuteSql(sql);
return k;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -